@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&family=Noto+Sans+KR:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --page: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f6f6f6;
  --surface-hover: #f1f1f1;
  --ink: #151515;
  --muted: #666666;
  --subtle: #858585;
  --line: #dedede;
  --line-strong: #bdbdbd;
  --shadow: 0 20px 60px rgba(0, 0, 0, .1);
  font-family: "DM Sans", "Noto Sans KR", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img { filter: grayscale(1); }
[hidden] { display: none !important; }
.page-wrap { width: min(1440px, calc(100% - 80px)); margin-inline: auto; }

.admin-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.wordmark-light { color: var(--muted); font-weight: 500; }
.mark { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 2px; background: var(--ink); color: #ffffff; font: 600 18px/1 Georgia, serif; letter-spacing: -.06em; }
.admin-header-label { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .16em; }

.workspace-section { min-height: calc(100vh - 68px); padding: 40px 0 72px; background: var(--page); }
.workspace-wrap { max-width: 1440px; }
.workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.4; font-weight: 700; letter-spacing: .17em; }
.workspace-heading h1 { margin: 10px 0 0; font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -.065em; line-height: 1.2; }
.workspace-heading-note { margin: 0 2px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.8; text-align: right; }

.login-card { display: grid; grid-template-columns: .92fr 1.08fr; gap: 50px; max-width: 790px; margin: 52px auto; padding: 38px 42px; border: 1px solid var(--line); background: var(--surface); }
.login-lock { width: 30px; height: 30px; display: grid; place-items: center; margin-bottom: 18px; border: 1px solid var(--line); color: var(--ink); }
.login-card-copy h3 { margin: 12px 0 11px; font-size: 22px; font-weight: 600; letter-spacing: -.05em; }
.login-card-copy > p:last-child { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.login-form { display: flex; flex-direction: column; }
.login-form label, .form-grid label { margin: 0 0 6px; color: var(--muted); font-size: 10px; font-weight: 600; }
.login-form input, .form-grid input, .form-grid textarea, .form-grid select {
  width: 100%;
  min-height: 40px;
  margin: 0 0 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
}
.login-form input:focus, .form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus,
.cell-input:focus, .cell-textarea:focus, .markdown-editor:focus, .status-row input:focus, .add-status-form input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .08);
}
.login-message { min-height: 15px; margin: 12px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.login-message.error, .board-save-state.is-error { color: var(--ink); font-weight: 600; }

.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 2px; cursor: pointer; font-size: 10px; font-weight: 600; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.button:disabled { cursor: wait; opacity: .6; }
.button-dark, .button-accent { border-color: var(--ink); background: var(--ink); color: #ffffff; }
.button-dark:hover, .button-accent:hover { background: #3b3b3b; }
.button-light { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.button-light:hover { border-color: var(--ink); background: var(--surface-soft); }
.login-submit { width: 100%; min-height: 42px; margin-top: 1px; }

.member-panel { padding: 22px; border: 1px solid var(--line); background: var(--surface); }
.backend-note { margin: 0 0 18px; padding: 10px 13px; border: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 10px; line-height: 1.7; }
.member-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.member-greeting { min-width: 150px; display: flex; align-items: center; gap: 10px; }
.member-indicator { width: 7px; height: 7px; border: 1px solid var(--ink); border-radius: 50%; background: #ffffff; }
.member-greeting strong, .member-greeting small { display: block; }
.member-greeting strong { max-width: 210px; overflow: hidden; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.member-greeting small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.toolbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.search-box { height: 35px; min-width: 166px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.search-box > span { font-size: 18px; line-height: 1; }
.search-box input { width: 135px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10px; }
.search-box:focus-within { border-color: var(--ink); }
.signout-button { border: 0; padding: 7px 4px; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; }
.board-meta { display: flex; align-items: center; justify-content: space-between; padding: 20px 0 13px; }
.board-meta > div { display: flex; align-items: center; gap: 11px; }
.board-title { font: 600 14px Manrope, sans-serif; letter-spacing: -.04em; }
.board-count { padding: 4px 7px; border: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.board-save-state { color: var(--muted); font-size: 9px; }
.table-frame { position: relative; overflow: auto; border: 1px solid var(--line); background: var(--surface); }
.sourcing-table { width: 100%; min-width: 1210px; border-collapse: collapse; table-layout: fixed; }
.sourcing-table th { padding: 11px 9px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 600; text-align: left; white-space: nowrap; }
.sourcing-table td { min-height: 70px; padding: 11px 8px; border-bottom: 1px solid #e8e8e8; vertical-align: top; }
.sourcing-table tr:last-child td { border-bottom: 0; }
.sourcing-table tbody tr:hover { background: #fafafa; }
.no-results { padding: 35px 15px !important; color: var(--muted); font-size: 10px; text-align: center; }
.photo-col { width: 84px; }
.name-col { width: 124px; }
.idea-col { width: 220px; }
.status-col { width: 142px; }
.action-col { width: 155px; }
.notes-col { width: 160px; }
.sourcing-table th:nth-child(3), .sourcing-table th:nth-child(4) { width: 160px; }
.sourcing-table th:nth-child(5) { width: 175px; }
.profile-cell { display: flex; align-items: center; gap: 5px; }
.avatar { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-soft); color: var(--muted); font-size: 12px; font-weight: 600; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.photo-edit { width: 19px; height: 19px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.photo-edit:hover { background: var(--surface-hover); color: var(--ink); }
.photo-url-edit { position: relative; margin-top: 7px; color: var(--muted); font-size: 8px; }
.photo-url-edit summary { cursor: pointer; list-style: none; }
.photo-url-edit summary::-webkit-details-marker { display: none; }
.photo-url-edit summary::before { content: "+ "; color: var(--ink); }
.photo-url-edit[open] summary::before { content: "− "; }
.photo-url-edit input { width: 170px; margin-top: 5px; }
.cell-input, .cell-textarea { width: 100%; min-height: 29px; padding: 5px 6px; border: 1px solid transparent; border-radius: 1px; outline: 0; background: transparent; color: var(--ink); font-size: 9px; line-height: 1.55; }
.cell-input:hover, .cell-textarea:hover { border-color: var(--line); }
.cell-input:focus, .cell-textarea:focus { border-color: var(--ink); background: var(--surface); }
.cell-input.name-input { font-weight: 600; }
.cell-input.url-input, .cell-input.email-input { padding-left: 0; color: var(--muted); }
.cell-textarea { min-height: 50px; resize: vertical; }
.cell-textarea.idea-input { min-height: 65px; font-size: 10px; }
.link-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.link-cell a { display: inline-block; min-height: 13px; color: var(--ink); font-size: 8px; text-decoration: underline; text-underline-offset: 2px; }
.link-cell a:hover { color: var(--muted); }
.status-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.status-select { width: 100%; max-width: 128px; height: 29px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 2px; outline: 0; background: var(--surface); color: var(--ink); font-size: 9px; }
.status-select:focus { border-color: var(--ink); }
.history-button { border: 0; padding: 0 2px; background: transparent; color: var(--muted); cursor: pointer; font-size: 8px; }
.history-button:hover { color: var(--ink); text-decoration: underline; }
.empty-state { min-height: 266px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; }
.empty-state > span { color: var(--ink); font-size: 25px; }
.empty-state h3 { margin: 11px 0 7px; font-size: 15px; font-weight: 600; letter-spacing: -.04em; }
.empty-state p { margin: 0 0 17px; color: var(--muted); font-size: 10px; }
.empty-state .button { margin-top: 3px; }
.table-footnote { display: flex; align-items: center; gap: 7px; margin: 14px 1px 0; color: var(--muted); font-size: 9px; }
.footnote-dot { width: 5px; height: 5px; border: 1px solid var(--ink); border-radius: 50%; }

.modal { width: min(600px, calc(100% - 32px)); max-width: none; max-height: min(88vh, 850px); padding: 0; overflow: auto; border: 0; background: transparent; color: var(--ink); }
.modal::backdrop { background: rgba(0, 0, 0, .48); }
.modal-card { padding: 30px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.modal-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.modal-heading h2 { margin: 8px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -.06em; }
.icon-button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; font-size: 20px; line-height: 1; }
.icon-button:hover { background: var(--surface-soft); }
.modal-description { margin: 12px 0 20px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.modal-description code { padding: 1px 4px; border: 1px solid var(--line); color: var(--ink); font-size: 9px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; }
.form-grid input, .form-grid textarea, .form-grid select { margin: 0 0 13px; font-size: 10px; }
.form-grid textarea { min-height: 77px; resize: vertical; }
.field-wide { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
.status-list { display: flex; flex-direction: column; gap: 8px; max-height: 310px; overflow: auto; }
.status-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; }
.status-row input { width: 100%; min-height: 34px; padding: 7px 9px; border: 1px solid var(--line); outline: 0; background: var(--surface); font-size: 10px; }
.status-usage { min-width: 55px; color: var(--muted); font-size: 8px; text-align: right; }
.status-delete { min-height: 30px; padding: 0 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 8px; }
.status-delete:disabled { cursor: not-allowed; opacity: .48; }
.add-status-form { display: flex; gap: 8px; margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.add-status-form input { min-width: 0; min-height: 36px; flex: 1; padding: 8px 10px; border: 1px solid var(--line); outline: 0; background: var(--surface); font-size: 10px; }
.modal-feedback { min-height: 17px; margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.history-card, .markdown-card { width: 100%; }
.history-list { max-height: 54vh; display: flex; flex-direction: column; gap: 0; margin: 18px 0 0; padding: 0; overflow: auto; list-style: none; }
.history-item { position: relative; padding: 0 0 18px 20px; border-left: 1px solid var(--line-strong); }
.history-item::before { content: ""; position: absolute; top: 4px; left: -4px; width: 7px; height: 7px; border: 1px solid var(--ink); border-radius: 50%; background: var(--surface); }
.history-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.history-item strong { display: block; font-size: 10px; font-weight: 600; }
.history-item p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.history-empty { color: var(--muted); font-size: 10px; }
.markdown-editor { width: 100%; min-height: 310px; max-height: 50vh; padding: 12px; border: 1px solid var(--line); outline: 0; background: var(--surface); color: var(--ink); font: 10px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; tab-size: 2; }
.modal-actions-spread { justify-content: space-between; align-items: center; }
.modal-actions-spread > span { display: inline-flex; gap: 8px; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: min(420px, calc(100% - 48px)); padding: 12px 16px; border: 1px solid var(--ink); background: var(--ink); color: #ffffff; box-shadow: 0 12px 30px rgba(0, 0, 0, .18); font-size: 10px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }

@media (max-width: 1000px) {
  .page-wrap { width: calc(100% - 48px); }
  .member-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .page-wrap { width: calc(100% - 32px); }
  .admin-header { min-height: 60px; }
  .wordmark { gap: 8px; font-size: 9px; }
  .mark { width: 23px; height: 23px; font-size: 17px; }
  .admin-header-label { font-size: 8px; }
  .workspace-section { padding: 30px 0 48px; }
  .workspace-heading { align-items: flex-start; flex-direction: column; gap: 9px; margin-bottom: 20px; }
  .workspace-heading h1 { margin-top: 8px; font-size: 28px; }
  .workspace-heading-note { text-align: left; }
  .login-card { grid-template-columns: 1fr; gap: 24px; margin: 24px auto; padding: 24px 20px; }
  .member-panel { padding: 12px; }
  .toolbar-actions { width: 100%; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
  .toolbar-actions > .button { flex: 1; }
  .signout-button { margin-left: auto; }
  .board-meta { align-items: flex-start; flex-direction: column; gap: 6px; }
  .board-save-state { font-size: 8px; }
  .modal-card { padding: 22px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .modal-actions-spread { align-items: flex-start; flex-direction: column; }
  .modal-actions-spread > span { width: 100%; justify-content: flex-end; }
  .toast { right: 12px; bottom: 12px; max-width: calc(100% - 24px); }
}

