:root {
  --ink: #1c1e21;
  --muted: #777870;
  --line: #d4d4cc;
  --paper: #e8e8e3;
  --soft: #e7f0ff;
  --green: #00a86b;
  --green-dark: #007a4f;
  --blue: #1877f2;
  --red: #c0392b;
  --gold: #f5a623;
  --white: #ffffff;
  font-family: "Pretendard", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 242, 0.97);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0;
}

.brand-full {
  display: block;
  width: min(430px, 46vw);
  height: auto;
}

.brand-text-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--blue);
}

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

.brand h1,
.brand p,
.hero h2,
.hero p,
.section-heading h2,
.section-heading p,
.panel-head h2,
.panel-head p {
  margin: 0;
}

.brand h1 {
  font-size: 1.72rem;
  line-height: 1.1;
}

.brand p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
}

.brand .en-caption {
  margin-top: 1px;
  font-size: 0.74rem;
}

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

.quick-actions a,
button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.quick-actions a:hover,
.quick-actions button:hover {
  background: #f7f7f2;
}

.quick-actions a {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.9rem;
}

.quick-actions button {
  padding: 0 12px;
  font-size: 0.9rem;
}

.is-hidden {
  display: none !important;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  display: block;
  padding: 28px 0 22px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
}

.hero h2 {
  margin-top: 8px;
  font-size: clamp(1.75rem, 3.4vw, 3.2rem);
  line-height: 1.14;
}

.en-subtitle {
  margin-top: 10px;
  color: var(--blue);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
}

.hero-copy > p:last-child {
  margin-top: 18px;
  max-width: 610px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.search-panel,
.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.search-panel {
  padding: 18px;
}

.home-board-card {
  align-self: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.home-board-card h2 {
  margin: 6px 0 8px;
  font-size: 1.35rem;
  line-height: 1.35;
}

.home-board-card p:not(.eyebrow) {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: var(--white);
  font-weight: 800;
}

.primary-link:hover {
  background: #0f66d8;
}

label {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

label span,
.en-caption {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

label span {
  display: inline;
  margin-left: 4px;
}

label input,
label select,
label textarea {
  margin-top: 8px;
}

.helper-copy {
  margin: 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.4;
}

.inquiry-note {
  margin-top: 14px;
}

.inquiry-note .en-caption {
  margin-top: 3px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 8px;
  margin-top: 8px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7f7f2;
  color: var(--ink);
  font: inherit;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(24, 119, 242, 0.2);
  outline-offset: 2px;
}

button[type="submit"] {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

button[type="submit"]:hover {
  background: #0f66d8;
}

.select-row,
.field-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.select-row {
  margin-top: 14px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.filter {
  min-width: 0;
  padding: 0 8px;
  font-size: 0.9rem;
}

.filter.active {
  border-color: #cfe0ff;
  background: var(--soft);
  color: var(--blue);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  font-weight: 800;
}

.hero-stats strong {
  color: var(--blue);
  font-size: 1.25rem;
}

.notice-strip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f2;
  color: var(--ink);
  line-height: 1.55;
}

.notice-strip strong {
  flex: 0 0 auto;
  color: var(--blue);
}

.board-section {
  padding: 22px 0 34px;
}

.board-search {
  margin-bottom: 16px;
}

.secondary-boards {
  padding-top: 0;
}

.board-entry,
.board-page-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f2;
}

.board-entry h2,
.board-page-head h2 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

.board-entry-actions,
.board-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.board-entry-actions button,
.board-tabs button,
.board-page-head > button {
  padding: 0 12px;
}

.board-entry-actions button:first-child,
.board-tabs button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.split-boards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.mini-board {
  min-width: 0;
}

.compact-heading {
  align-items: start;
  margin-bottom: 10px;
}

.compact-heading h2 {
  font-size: 1.15rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2,
.panel-head h2 {
  margin-top: 4px;
  font-size: 1.45rem;
}

.count-label {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.post-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 6px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
}

.post-card:last-child {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  min-height: 26px;
  border-radius: 8px;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.job {
  background: var(--green);
}

.badge.worker {
  background: var(--blue);
}

.badge.foreign {
  background: #6f42c1;
}

.badge.meetup {
  background: var(--gold);
}

.post-title-row {
  display: grid;
  grid-template-columns: minmax(0, max-content) auto;
  gap: 8px;
  align-items: center;
  max-width: 100%;
}

.post-title-link {
  display: block;
  width: auto;
  min-width: 0;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-type-en {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.post-meta,
.post-body {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.post-actions button,
.detail-actions button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.post-actions button:first-child,
.detail-actions button:first-child {
  border-color: #cfe0ff;
  background: var(--soft);
  color: var(--blue);
}

.empty-state {
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--white);
  text-align: center;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.pager button {
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.86rem;
}

.pager button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.forms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: start;
}

.form-panel {
  padding: 18px;
}

.board-form {
  margin-top: 16px;
}

.post-form {
  display: grid;
  gap: 13px;
  margin-top: 16px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  transform: translateY(120px);
  max-width: min(360px, calc(100vw - 36px));
  padding: 13px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
  transition: transform 180ms ease;
}

.toast.show {
  transform: translateY(0);
}

.detail-dialog {
  width: min(680px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.detail-dialog::backdrop {
  background: rgba(11, 22, 18, 0.45);
}

.detail-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.icon-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
}

.detail-card h2 {
  max-width: calc(100% - 42px);
  margin: 14px 0 4px;
  font-size: 1.45rem;
  line-height: 1.35;
}

.detail-en-title {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0;
}

.detail-list div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f2;
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.detail-list dt span,
.detail-label span {
  display: block;
  margin-top: 2px;
  color: var(--blue);
  font-size: 0.74rem;
}

.detail-list dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.detail-body {
  margin: 6px 0 0;
  color: var(--ink);
  line-height: 1.7;
}

.detail-label {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.detail-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 920px) {
  .topbar,
  .hero,
  .board-entry,
  .board-page-head,
  .split-boards,
  .forms-grid {
    grid-template-columns: 1fr;
  }

  .board-entry,
  .board-page-head {
    display: grid;
    align-items: start;
  }

  .board-entry-actions,
  .board-tabs {
    justify-content: stretch;
  }

  .board-entry-actions button,
  .board-tabs button,
  .board-page-head > button {
    width: 100%;
  }

  .topbar {
    display: grid;
    align-items: start;
    gap: 12px;
  }

  .quick-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .quick-actions a,
  .quick-actions button {
    justify-content: center;
    width: 100%;
    min-height: 38px;
    padding: 0 8px;
    font-size: 0.84rem;
  }

  .hero {
    align-items: stretch;
  }
}

@media (max-width: 620px) {
  body {
    overflow-x: hidden;
  }

  main {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
    padding-bottom: 36px;
  }

  .topbar {
    padding: 12px 10px;
  }

  .brand {
    gap: 10px;
  }

  .brand-full {
    width: min(300px, 72vw);
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand h1 {
    font-size: 1.42rem;
  }

  .brand p:not(.en-caption) {
    display: none;
  }

  .brand .en-caption {
    font-size: 0.7rem;
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .quick-actions a,
  .quick-actions button {
    min-height: 36px;
    font-size: 0.8rem;
  }

  .hero {
    gap: 16px;
    padding: 20px 0 18px;
  }

  .hero h2 {
    font-size: 1.48rem;
    line-height: 1.16;
  }

  .en-subtitle {
    font-size: 0.9rem;
  }

  .hero-copy > p:last-child {
    margin-top: 10px;
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .hero-stats {
    gap: 6px;
    margin-top: 14px;
  }

  .hero-stats span {
    flex: 1 1 30%;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 0.82rem;
    justify-content: center;
  }

  .search-panel,
  .form-panel {
    padding: 14px;
  }

  .notice-strip {
    padding: 12px;
    font-size: 0.88rem;
  }

  .board-section {
    padding: 18px 0 24px;
  }

  .section-heading h2,
  .panel-head h2 {
    font-size: 1.22rem;
  }

  .search-row,
  .filter-row,
  .select-row,
  .field-pair,
  .detail-list {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .post-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 0;
    padding: 10px;
  }

  .badge {
    width: auto;
    min-width: 62px;
    padding: 0 8px;
    justify-self: start;
  }

  .post-title-link {
    font-size: 0.92rem;
  }

  .job-type-en {
    font-size: 0.7rem;
  }

  .post-meta {
    white-space: normal;
    line-height: 1.35;
  }

  .section-heading {
    display: grid;
  }

  .post-actions {
    justify-content: flex-end;
  }

  .post-actions button {
    min-height: 34px;
  }

  .post-title-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .notice-strip {
    display: grid;
  }

  .board-page-head {
    padding: 14px;
  }

  .detail-card {
    padding: 18px;
  }
}

@media (max-width: 380px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .hero-stats span {
    flex-basis: 100%;
  }
}
