:root {
  color: #142d37;
  background: #f1f5f5;
  font: 16px/1.5 "Noto Sans KR", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: #086559; text-underline-offset: 3px; }
.board-header { background: white; border-bottom: 1px solid #dce6e5; }
.board-header-inner, main { max-width: 1240px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 44px); }
.board-header-inner { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 16px; }
.board-header img { display: block; max-width: 100%; height: auto; }
main { padding-block: 38px 72px; }
h1, h2, h3, p { margin: 0; }
.board-title { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; justify-content: space-between; margin-bottom: 20px; }
h1 { font-size: clamp(30px, 4.5vw, 48px); letter-spacing: -.04em; line-height: 1.2; }
h2 { font-size: 20px; }
.board-title p, .board-panel p { color: #506770; margin-top: 8px; }
.board-actions { display: flex; gap: 8px; }
button { border: 1px solid transparent; border-radius: 8px; background: #075b50; color: white; font: inherit; font-weight: 700; padding: 8px 13px; cursor: pointer; }
button:hover { background: #087266; }
button:disabled { opacity: .65; cursor: default; }
button.secondary { border-color: #c4d4d3; color: #174845; background: #fff; }
button.secondary:hover { background: #e5f3ef; }
button.danger { border-color: #e4c1ba; color: #962e21; background: #fff; }
button.danger:hover { background: #fff1ed; }
:focus-visible { outline: 2px solid #087266; outline-offset: 2px; }
.board-notice { color: #3b5a62; margin-bottom: 14px; }
.board-notice:empty { display: none; }
.board-notice[data-error] { color: #8b3321; }
.board-panel { background: white; border: 1px solid #d6e2e0; border-radius: 14px; padding: 22px; }
#board-login { max-width: 520px; }
.board-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.board-form label, .board-share-result label { display: grid; gap: 4px; color: #294b51; font-size: 14px; font-weight: 700; }
.board-form label { flex: 1 1 140px; }
.board-form input, .board-form select, .board-card select, .board-card textarea, .board-share-result input {
  min-width: 0; width: 100%; min-height: 40px; padding: 7px 9px; border: 1px solid #c4d4d3; border-radius: 8px; background: white; color: #142d37; font: inherit;
}
.board-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)) auto;
  margin: 0 0 16px;
  padding: 15px;
  background: #fff;
  border: 1px solid #d6e2e0;
  border-radius: 12px;
}
.board-filter-actions { display: flex; gap: 7px; }
.board-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.board-toolbar label { font-size: 14px; }
.board-current { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; }
#board-sync { color: #506770; font-size: 13px; }
.board-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.board-column { min-width: 0; padding: 15px; border: 1px solid #d4e1df; border-radius: 13px; background: #e8f0ef; }
.board-column h2 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 16px; }
.board-count { padding: 2px 8px; border-radius: 10px; background: #d6e5e2; color: #234c47; font-size: 13px; }
.board-empty { color: #4d656d; font-size: 14px; margin-bottom: 6px; }
.board-card { display: grid; gap: 8px; padding: 13px; margin-top: 9px; overflow-wrap: anywhere; background: white; border: 1px solid #d7e2e2; border-radius: 10px; }
.board-card time { color: #506770; font-size: 13px; }
.board-card h3 { font-size: 17px; }
.card-site, .card-contacts { display: grid; gap: 3px; font-size: 14px; }
.card-site ul { margin: 0; padding-inline-start: 20px; }
.card-notes { white-space: pre-wrap; color: #294b51; }
.card-details { padding-top: 6px; border-top: 1px solid #e2eceb; color: #506770; font-size: 13px; }
.card-details summary { cursor: pointer; }
.card-details p { margin-top: 5px; }
.card-details dl { margin: 5px 0; }
.card-details dd { margin: 0 0 4px; }
.card-assignee { color: #365861; font-size: 14px; }
.card-followup form, .card-followup label { display: grid; gap: 5px; }
.card-followup form { gap: 9px; margin-top: 9px; }
.card-followup label { color: #294b51; font-weight: 700; }
.card-followup textarea { resize: vertical; }
.card-followup button { justify-self: start; }
.card-followup .board-conflict { margin: 0; color: #8b3321; }
.card-state { display: flex; gap: 6px; }
.card-state button { flex: none; padding-inline: 9px; }
#board-settings { margin-top: 24px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 15px; }
.board-share-result { display: grid; gap: 6px; margin-top: 10px; }
.board-share-result button { justify-self: start; }
.board-members { display: grid; gap: 7px; padding: 0; margin: 14px 0 0; list-style: none; }
.board-members li { display: flex; justify-content: space-between; align-items: center; gap: 8px; overflow-wrap: anywhere; font-size: 14px; }
@media (max-width: 760px) {
  .board-columns, .settings-grid { grid-template-columns: 1fr; }
  .board-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-filter-address { grid-column: 1 / -1; }
  .board-filter-actions { flex-wrap: wrap; }
  main { padding-top: 25px; }
}

.activity-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.activity-hint { margin: 0 0 10px; color: #5b6f76; font-size: 14px; }
.activity-table-wrap { overflow-x: auto; border: 1px solid #dce5e7; border-radius: 10px; background: #fff; }
.activity-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.activity-table th, .activity-table td { padding: 9px 12px; border-bottom: 1px solid #eef2f3; text-align: left; white-space: nowrap; }
.activity-table th { background: #f5faf7; color: #173138; font-weight: 700; }
.activity-table td.wrap { white-space: normal; min-width: 220px; }
.activity-table tr:last-child td { border-bottom: 0; }

.card-viewed { margin: 6px 0; padding: 6px 9px; border-radius: 7px; background: #fff7e0; color: #7a5300; font-size: 13px; }


.member-credentials { margin-top: 6px; }
.member-credentials summary { cursor: pointer; color: #075b50; font-size: 14px; }
.member-credentials form { margin-top: 8px; }


/* list layout */
.board-tabs { display: flex; gap: 4px; margin: -4px 0 18px; border-bottom: 1px solid #d6e2e0; overflow-x: auto; }
.board-tabs button { flex: none; padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: #506770; }
.board-tabs button:hover { background: #e8f0ef; }
.board-tabs button[aria-current="page"] { color: #075b50; border-bottom-color: #075b50; }
#board-settings, #board-account, #board-activity { margin-top: 0; }
#board-account { margin-top: 16px; }
.board-filters { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto auto; align-items: end; }
.board-filter-more { align-self: center; font-size: 14px; color: #294b51; }
.board-filter-more summary { cursor: pointer; padding: 8px 4px; font-weight: 700; }
.board-filter-more[open] { grid-column: 1 / -1; order: 5; }
.board-filter-more > div { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.board-filter-more label { flex: 1 1 160px; }
.status-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.status-chip { padding: 6px 13px; border-radius: 999px; border: 1px solid #c4d4d3; background: #fff; color: #294b51; font-weight: 700; font-size: 14px; }
.status-chip:hover { background: #e8f3ef; }
.status-chip[aria-selected="true"] { background: #075b50; border-color: #075b50; color: #fff; }
.inquiry-list { background: #fff; border: 1px solid #d6e2e0; border-radius: 12px; overflow: hidden; }
.inquiry-head, .inquiry-row { display: grid; grid-template-columns: 110px minmax(80px, 1fr) minmax(100px, 1.1fr) minmax(140px, 2fr) minmax(80px, .9fr) 84px; gap: 12px; align-items: center; padding: 11px 16px; }
.inquiry-head { background: #f5faf7; color: #4d656d; font-size: 13px; font-weight: 700; border-bottom: 1px solid #e2eceb; }
.inquiry-list .board-empty { padding: 22px 16px; margin: 0; }
.inquiry-entry + .inquiry-entry { border-top: 1px solid #eef2f3; }
.inquiry-row { width: 100%; border: 0; border-radius: 0; background: #fff; color: #142d37; font-weight: 400; text-align: left; font-size: 15px; }
.inquiry-row:hover { background: #f3f8f6; }
.inquiry-row[aria-expanded="true"] { background: #eaf4f1; }
.inquiry-row span, .inquiry-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-date, .cell-assignee { color: #506770; font-size: 14px; }
.cell-status { justify-self: start; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.status-1 { background: #fff1d6; color: #8a5a00; }
.status-2 { background: #e0eefc; color: #1d4f86; }
.status-3 { background: #e3f3e8; color: #23683a; }
.inquiry-detail { padding: 4px 16px 16px; background: #f7fbfa; border-top: 1px solid #e2eceb; }
.inquiry-card { margin-top: 10px; }
.inquiry-card > h3, .inquiry-card > time { display: none; }
@media (max-width: 760px) {
  .board-filters { grid-template-columns: 1fr 1fr; }
  .inquiry-head { display: none; }
  .inquiry-row { grid-template-columns: 1fr auto; grid-template-areas: "name status" "topic date" "address address"; gap: 3px 10px; padding: 12px 14px; }
  .cell-name { grid-area: name; font-size: 16px; }
  .cell-status { grid-area: status; justify-self: end; }
  .cell-topic { grid-area: topic; color: #294b51; font-size: 14px; }
  .cell-date { grid-area: date; justify-self: end; font-size: 13px; }
  .cell-address { grid-area: address; color: #506770; font-size: 14px; }
  .cell-assignee { display: none; }
  .inquiry-detail { padding: 4px 10px 12px; }
}

.inquiry-card .card-state select { max-width: 200px; }
@media (max-width: 760px) { .board-title p { display: none; } h1 { font-size: 28px; } .board-filters { padding: 12px; gap: 8px; } main { padding-top: 18px; } }


.list-refresh { padding: 5px 11px; font-size: 13px; }
.fresh-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: #e0473a; color: #fff; font-size: 11px; font-weight: 800; vertical-align: 2px; }
.inquiry-entry.is-fresh .inquiry-row { background: #fff8ec; }


.board-tabs { scrollbar-width: none; }
.board-tabs::-webkit-scrollbar { display: none; }


/* who viewed */
.inquiry-head, .inquiry-row { grid-template-columns: 100px minmax(70px, 1fr) minmax(90px, 1fr) minmax(120px, 1.6fr) minmax(64px, .7fr) minmax(130px, 1.5fr) 76px; }
.cell-viewers { display: flex; flex-wrap: wrap; gap: 4px; white-space: normal !important; }
.viewer-chip { padding: 1px 7px; border-radius: 6px; background: #eef1f2; color: #8a979b; font-size: 12px; font-weight: 700; }
.viewer-chip.seen { background: #dff1e6; color: #1f6b3b; }
.inquiry-entry.is-unread .cell-name { color: #0b3d36; }
.inquiry-entry.is-unread .cell-name::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #0a7d6c; vertical-align: 2px; }
.inquiry-entry:not(.is-unread) .cell-name { font-weight: 500; color: #3d575e; }
.viewer-summary { margin-top: 10px; padding: 10px 12px; border: 1px solid #d7e2e2; border-radius: 10px; background: #fff; font-size: 14px; }
.viewer-summary ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.viewer-summary li { display: flex; gap: 8px; flex-wrap: wrap; }
.viewer-summary li b { min-width: 72px; }
.viewer-summary li.seen span { color: #1f6b3b; }
.viewer-summary li.unseen span { color: #9a6b00; }
@media (max-width: 760px) {
  .inquiry-row { grid-template-areas: "name status" "topic date" "address address" "viewers viewers"; }
  .cell-viewers { grid-area: viewers; margin-top: 4px; }
}

.members-title { margin-top: 22px; padding-top: 14px; border-top: 1px solid #e2eceb; }
.board-members li.member-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px; border: 1px solid #d6e2e0; border-radius: 10px; background: #f7fbfa; }
.board-members li.member-row > span { font-weight: 700; color: #173138; }
.board-members li.member-row form.member-credentials { grid-column: 1 / -1; margin-top: 2px; }
.board-members li.member-row form.member-credentials label { flex: 1 1 120px; }
.account-warning { margin: 8px 0 0; padding: 8px 11px; border-radius: 8px; background: #fff4e5; color: #8a4b00; font-size: 14px; font-weight: 700; }

/* stages */
.status-1 { background: #fff1d6; color: #8a5a00; }
.status-2 { background: #efe6fb; color: #5b2f99; }
.status-3 { background: #e0eefc; color: #1d4f86; }
.status-4 { background: #d93a2b; color: #fff; }
.status-5 { background: #e3f3e8; color: #23683a; }
.inquiry-entry.is-blocked .inquiry-row { background: #fdecea; box-shadow: inset 4px 0 0 #d93a2b; }
.inquiry-entry.is-blocked .inquiry-row:hover { background: #fbe0dc; }
.inquiry-entry.is-blocked .cell-name, .inquiry-entry.is-blocked .cell-topic { color: #a1271b; }
.status-chip[data-status="진행불가"] { border-color: #e7a59d; color: #a1271b; }
.status-chip[data-status="진행불가"][aria-selected="true"] { background: #d93a2b; border-color: #d93a2b; color: #fff; }
.inquiry-card .card-state select option[value="진행불가"] { color: #a1271b; }

/* number column */
.inquiry-head, .inquiry-row { grid-template-columns: 46px 100px minmax(70px, 1fr) minmax(90px, 1fr) minmax(120px, 1.6fr) minmax(64px, .7fr) minmax(130px, 1.5fr) 76px; }
.cell-no { color: #6a7f86; font-size: 14px; font-variant-numeric: tabular-nums; text-align: center; }
.inquiry-head span:first-child { text-align: center; }
@media (max-width: 760px) {
  .inquiry-row { grid-template-columns: auto 1fr auto; grid-template-areas: "no name status" "no topic date" "no address address" "no viewers viewers"; }
  .cell-no { grid-area: no; align-self: start; min-width: 26px; padding-top: 2px; font-weight: 700; }
}

/* full date */
.inquiry-head, .inquiry-row { grid-template-columns: 46px 190px minmax(70px, 1fr) minmax(90px, 1fr) minmax(120px, 1.5fr) minmax(64px, .7fr) minmax(130px, 1.4fr) 76px; }

/* wider board */
.board-header-inner, main { max-width: 1680px; }

