/* FINENUTS BID RADAR — 디자인 시스템 v1.4
   참고: 둥근 대형 카드 · 알약형 내비 · 얇고 큰 숫자 · 흰 반투명 카드 (네이비 톤으로 조정)
   토큰은 :root 에 모아둠 → 피그마 변수와 1:1 */
/* 페이퍼로지 (Freesentation, SIL OFL 1.1) */
@font-face { font-family: 'Paperlogy'; font-weight: 300; font-display: swap; src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-3Light.woff2') format('woff2'); }
@font-face { font-family: 'Paperlogy'; font-weight: 400; font-display: swap; src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-4Regular.woff2') format('woff2'); }
@font-face { font-family: 'Paperlogy'; font-weight: 500; font-display: swap; src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-5Medium.woff2') format('woff2'); }
@font-face { font-family: 'Paperlogy'; font-weight: 600; font-display: swap; src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-6SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Paperlogy'; font-weight: 700; font-display: swap; src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-7Bold.woff2') format('woff2'); }
@font-face { font-family: 'Paperlogy'; font-weight: 800; font-display: swap; src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2') format('woff2'); }

:root {
  /* 바탕 — 차가운 회청색 그라데이션 */
  --canvas-a: #E7EBF2;
  --canvas-b: #EEF1F7;
  --canvas-c: #DCE4F1;
  /* 카드 */
  --card: rgba(255, 255, 255, .78);
  --card-solid: #FFFFFF;
  --card-line: rgba(255, 255, 255, .9);
  --well: #F3F5F9;
  /* 네이비 */
  --navy-900: #131C33;
  --navy-800: #1B2747;
  --navy-700: #26355E;
  --navy-500: #4A5B85;
  --navy-300: #A9B4CC;
  --navy-100: #E3E8F2;
  --navy-50: #F0F3F9;
  /* 글자 */
  --ink: #131C33;
  --ink-2: #4E5873;
  --ink-3: #8B93A8;
  --line: rgba(19, 28, 51, .09);
  --line-2: rgba(19, 28, 51, .05);
  /* 포인트 — 마감 임박만 노랑 */
  --signal: #F5C842;
  --signal-soft: #FBEFC4;
  --danger: #C8452F;
  --danger-soft: #F8E1DC;
  --ok: #2E7D5B;
  --ok-soft: #DFF1E8;
  --violet: #6A55B8;
  --violet-soft: #ECE7F9;
  /* 형태 */
  --r-shell: 32px;
  --r-card: 24px;
  --r-ctl: 14px;
  --pill: 999px;
  --ctl: 40px;          /* 같은 줄 버튼·입력 높이 통일 */
  --ctl-sm: 36px;       /* 카드 안 버튼 높이 통일 */
  --shadow: 0 1px 1px rgba(19, 28, 51, .03), 0 12px 32px -18px rgba(19, 28, 51, .28);
  --font: 'Paperlogy', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --fs-xs: 12px; --fs-s: 13px; --fs-m: 14px; --fs-l: 16px; --fs-title: 18px; --fs-xl: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: var(--fs-m); line-height: 1.5; color: var(--ink);
  background: linear-gradient(135deg, var(--canvas-a) 0%, var(--canvas-b) 48%, var(--canvas-c) 100%) fixed;
  -webkit-font-smoothing: antialiased; word-break: keep-all; min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--navy-500); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 버튼 (같은 줄은 모두 같은 높이) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--ctl); padding: 0 18px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--card-solid); font-weight: 600; font-size: var(--fs-s); cursor: pointer; white-space: nowrap; text-decoration: none; line-height: 1; }
.btn:hover { border-color: var(--navy-300); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn--primary:hover { background: var(--navy-900); border-color: var(--navy-900); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--navy-50); border-color: transparent; }
.btn--sm { height: var(--ctl-sm); padding: 0 14px; font-size: var(--fs-xs); }
.btn--block { width: 100%; height: 48px; font-size: var(--fs-m); }
.btn--danger { color: var(--danger); }
.circle-btn { width: var(--ctl); height: var(--ctl); flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--card-solid); display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); text-decoration: none; padding: 0; }
.circle-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.circle-btn:hover { border-color: var(--navy-300); }
.bid-actions .circle-btn { width: var(--ctl-sm); height: var(--ctl-sm); }
.icon-btn { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--ink-2); font-size: 16px; }
.icon-btn:hover { background: var(--navy-50); }

/* ---------- 접속 화면 (비밀번호 모드에서만) ---------- */
.radar { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.radar .blip { fill: var(--signal); stroke: none; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--card-line); backdrop-filter: blur(16px); border-radius: var(--r-shell); padding: 40px 36px 36px; box-shadow: var(--shadow); }
.login-card .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; font-size: var(--fs-s); color: var(--navy-800); }
.login-card h1 { font-size: 30px; font-weight: 300; line-height: 1.25; margin: 28px 0 8px; letter-spacing: -.02em; }
.login-sub { margin: 0 0 24px; color: var(--ink-2); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: var(--fs-s); font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; height: var(--ctl); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 0 14px; background: var(--card-solid); }
.field textarea { height: auto; min-height: 220px; padding: 12px 14px; line-height: 1.7; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy-500); box-shadow: 0 0 0 3px rgba(74, 91, 133, .14); }
.hint { font-size: var(--fs-xs); color: var(--ink-3); margin: 4px 0 16px; }
.form-error { background: var(--danger-soft); color: var(--danger); border-radius: var(--r-ctl); padding: 10px 14px; font-size: var(--fs-s); margin: 0 0 14px; }

/* ---------- 셸: 왼쪽 메뉴(LNB) + 본문 ---------- */
.app { display: grid; grid-template-columns: var(--lnb-w, 232px) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .2s ease; }
.app.is-collapsed { --lnb-w: 76px; }
.lnb { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 24px 14px 18px; background: var(--navy-900); color: #C3CBE0; overflow: hidden; }
.brand { display: flex; align-items: center; height: 40px; padding: 0 10px; margin-bottom: 22px; font-size: 24px; font-weight: 800; letter-spacing: -.01em; color: #fff; text-decoration: none; white-space: nowrap; }
.brand-mini { display: none; width: 48px; height: 40px; border-radius: 14px; background: rgba(255,255,255,.1); font-size: 15px; place-items: center; }
.menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.menu a { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px; border-radius: var(--r-ctl); text-decoration: none; font-weight: 600; font-size: var(--fs-m); color: #C3CBE0; white-space: nowrap; position: relative; }
.menu a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.menu a[aria-current="page"] { background: #fff; color: var(--navy-900); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.label { overflow: hidden; text-overflow: ellipsis; }
.count { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: var(--signal); color: #3A2B00; border-radius: var(--pill); padding: 1px 7px; line-height: 16px; }
.count--plain { background: rgba(255, 255, 255, .14); color: #E3E8F2; font-variant-numeric: tabular-nums; }
.count--plain.has-new, .menu a[aria-current="page"] .count--plain.has-new { background: var(--signal); color: #3A2B00; }
.menu a[aria-current="page"] .count--plain { background: var(--navy-100); color: var(--navy-700); }
.lnb-toggle { margin-top: auto; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-ctl); background: transparent; color: #8F9AB8; font-weight: 600; font-size: var(--fs-s); cursor: pointer; white-space: nowrap; }
.lnb-toggle:hover { background: rgba(255, 255, 255, .06); color: #fff; }
/* 접힌 상태: 아이콘만 */
.app.is-collapsed .lnb { padding-left: 14px; padding-right: 14px; }
.app.is-collapsed .brand { padding: 0; justify-content: center; }
.app.is-collapsed .brand-full, .app.is-collapsed .label { display: none; }
.app.is-collapsed .brand-mini { display: grid; }
.app.is-collapsed .menu a, .app.is-collapsed .lnb-toggle { justify-content: center; padding: 0; }
.app.is-collapsed .lnb-toggle .ic { transform: scaleX(-1); }
.app.is-collapsed .count { position: absolute; top: 6px; right: 6px; margin: 0; min-width: 8px; height: 8px; padding: 0; font-size: 0; }
.app.is-collapsed .count--plain:not(.has-new) { display: none; }

.main { min-width: 0; padding: 18px 32px 48px; container-type: inline-size; }
.topbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex: none; }
.sync { font-size: var(--fs-xs); color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sync::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.sync.is-error { color: var(--danger); }
.sync.is-error::before { background: var(--danger); }
.sync.is-busy::before { background: var(--signal); }
/* 설정 메뉴 */
.topbar, .settings { position: relative; }
.notice { position: static; } /* 알림 창은 상단 오른쪽 끝에 맞춤 */
/* 알림 */
#noticeBtn { position: relative; }
.notice-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--card-solid); }
.notice-pop { width: min(380px, calc(100vw - 28px)); padding: 0; display: flex; flex-direction: column; max-height: min(620px, 75vh); overflow: hidden; }
.notice-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line-2); }
.notice-head b { font-size: var(--fs-m, 15px); color: var(--ink); }
.notice-head span { font-size: 11px; color: var(--ink-3); }
.notice-list { overflow: auto; padding: 4px 18px 16px; }
.notice-list h4 { margin: 14px 0 8px; font-size: 11px; font-weight: 700; color: var(--ink-3); letter-spacing: .02em; }
.notice-item { position: relative; padding: 12px 14px; border-radius: 14px; background: var(--well); margin-bottom: 8px; }
.notice-item.is-unread { background: var(--navy-50); box-shadow: inset 3px 0 0 var(--signal); }
.notice-item time { display: block; font-size: 11px; font-weight: 700; color: var(--navy-700); margin-bottom: 6px; }
.notice-line { margin: 2px 0; font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.6; }
.notice-line a { color: inherit; text-decoration: none; }
.notice-line a:hover { text-decoration: underline; text-underline-offset: 3px; }
.notice-line b { color: var(--ink); }
.notice-line em { font-style: normal; color: var(--danger); }
.notice-line .sep { margin: 0 6px; color: var(--ink-3); }
.notice-line .hl { color: #7A5A00; }
.notice-strong { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.notice-strong button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 6px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: var(--fs-xs); color: var(--ink); text-align: left; cursor: pointer; }
.notice-strong button:hover { background: rgba(255, 255, 255, .7); }
.notice-strong b { flex: none; display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: var(--pill); background: var(--signal); color: #3A2B00; font-size: 12px; }
.notice-strong span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-act { max-height: none; gap: 10px; }
.notice-act li.is-unread::before { background: var(--signal); }
.notice-empty { margin: 0 0 8px; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.6; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 240px; padding: 6px; background: var(--card-solid); border-radius: 18px; box-shadow: 0 18px 48px -16px rgba(19, 28, 51, .35), 0 0 0 1px var(--line-2); display: grid; }
.menu-pop > button, .menu-pop > a { display: flex; align-items: center; height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: none; text-align: left; font-size: var(--fs-s); font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer; }
.menu-pop > button:hover, .menu-pop > a:hover { background: var(--navy-50); }
.menu-pop > button:disabled { color: var(--ink-3); cursor: wait; }
.menu-pop-foot { display: grid; gap: 2px; margin-top: 4px; padding: 10px 14px 8px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--ink-3); }

/* 히어로 — 제목 + 큰 숫자 */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 14px 0 24px; }
.hero h1 { margin: 0; min-width: 0; font-size: 40px; font-weight: 300; letter-spacing: -.025em; line-height: 1.15; color: var(--navy-900); }

.banner { margin: 0 0 16px; padding: 12px 18px; border-radius: var(--r-ctl); font-size: var(--fs-s); background: var(--signal-soft); color: #6B4E00; }
.banner.is-error { background: var(--danger-soft); color: var(--danger); }
.view { outline: none; }

/* ---------- 툴바 (높이 통일) ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.toolbar--split { align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.toolbar--split .chips { flex: 1 1 320px; min-width: 0; padding-top: 3px; }
.tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
/* 검색: 아이콘만 → 누르면 입력칸이 펼쳐짐 */
.search { display: inline-flex; align-items: center; height: var(--ctl); border-radius: var(--pill); border: 1px solid var(--card-line); background: var(--card-solid); transition: border-color .2s; }
.search-btn { border: 0 !important; background: transparent; }
.search-btn svg { stroke-width: 1.8; }
.search input { width: 0; padding: 0; border: 0; height: 100%; background: transparent; opacity: 0; font-size: var(--fs-s); transition: width .22s ease, opacity .15s, padding .22s; }
.search input:focus { outline: none; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search.is-open { border-color: var(--navy-300); }
.search.is-open input { width: 220px; padding-right: 16px; opacity: 1; }
.select { height: var(--ctl); border: 1px solid var(--card-line); border-radius: var(--pill); background-color: var(--card); padding: 0 34px 0 16px; font-size: var(--fs-s); font-weight: 600; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 19px) 18px, calc(100% - 14px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 34px; padding: 0 14px; border-radius: var(--pill); border: 1px solid var(--card-line); background: var(--card); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.toggle { display: inline-flex; align-items: center; gap: 8px; height: var(--ctl); padding: 0 14px; border-radius: var(--pill); background: var(--card); border: 1px solid var(--card-line); font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); cursor: pointer; }
.toggle input { accent-color: var(--navy-800); width: 16px; height: 16px; margin: 0; }
.spacer { flex: 1; }
.status-line { font-size: var(--fs-xs); color: var(--ink-3); margin: 4px 0 14px; }
.status-line strong { color: var(--ink-2); }
.status-line:empty { display: none; }

/* ---------- 공고 카드 (3열) ---------- */
.list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
/* 본문 너비 기준 반응형 — 메뉴를 접고 펴도 알맞게 */
@container (max-width: 1040px) { .list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 640px) { .list { grid-template-columns: 1fr; } }
.sentinel { height: 1px; }
.loading-more { text-align: center; font-size: var(--fs-xs); color: var(--ink-3); padding: 16px 0 4px; }
.bid { display: flex; flex-direction: column; gap: 12px; min-width: 0; background: var(--card); border: 1px solid var(--card-line); backdrop-filter: blur(14px); border-radius: var(--r-card); padding: 20px; box-shadow: var(--shadow); }
.bid.is-closed { background: rgba(255, 255, 255, .5); box-shadow: none; }
.bid.is-closed .bid-title, .bid.is-closed .bid-org, .bid.is-closed .budget b { color: var(--ink-3); }
.bid-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* D-day — 알약, 숫자만 (마감 일시는 아래 정보에만) */
.dday { flex: none; height: 40px; min-width: 76px; padding: 0 16px; border-radius: var(--pill); display: inline-flex; align-items: center; justify-content: center; background: var(--navy-50); color: var(--navy-800); }
.dday b { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.dday.is-soon { background: var(--signal); color: #3A2B00; }
.dday.is-today { background: var(--danger); color: #fff; }
.dday.is-closed { background: transparent; border: 1px dashed var(--navy-300); color: var(--ink-3); }
.dday.is-closed b { font-size: var(--fs-l); }
.dday.is-none { background: transparent; border: 1px solid var(--line); color: var(--ink-3); }
.dday.is-none b { font-size: var(--fs-s); }
.budget b { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; line-height: 1; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.budget small { font-size: var(--fs-xs); color: var(--ink-3); }

.bid-main { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.bid-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ink-2); }
.bid-org { font-weight: 700; color: var(--ink-2); margin-right: 2px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--pill); font-size: 11px; font-weight: 600; background: var(--navy-50); color: var(--navy-700); }
.tag--design { background: var(--navy-800); color: #fff; }
.tag--video { background: var(--violet-soft); color: var(--violet); }
.tag--new { background: var(--signal-soft); color: #7A5A00; }
.tag--kind { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
.bid-title { margin: 10px 0 14px; font-size: var(--fs-title); font-weight: 700; line-height: 1.42; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); }
.bid-title a { text-decoration: none; }
.bid-title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
/* 날짜·기관 정보: 등록·마감 한 줄 / 수요기관·계약 한 줄. 위아래 제목·내용 시작점 맞춤, 좁아지면 아래로 쌓임 */
.bid { container-type: inline-size; }
.bid-dates { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); gap: 6px 10px; align-items: baseline; font-size: var(--fs-xs); margin: auto 0 0; padding: 12px 14px; background: var(--well); border-radius: 16px; }
.bid-dates > div { display: contents; }
.bid-dates dt { color: var(--ink-3); white-space: nowrap; }
.bid-dates dd { margin: 0; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 왼쪽 열: 등록 ↓ 마감 / 오른쪽 열: 수요기관 ↓ 계약 */
.bid-dates > div:nth-child(1) dt { grid-area: 1 / 1; } .bid-dates > div:nth-child(1) dd { grid-area: 1 / 2; margin-right: 6px; }
.bid-dates > div:nth-child(2) dt { grid-area: 2 / 1; } .bid-dates > div:nth-child(2) dd { grid-area: 2 / 2; margin-right: 6px; }
.bid-dates > div:nth-child(3) dt { grid-area: 1 / 3; } .bid-dates > div:nth-child(3) dd { grid-area: 1 / 4; }
.bid-dates > div:nth-child(4) dt { grid-area: 2 / 3; } .bid-dates > div:nth-child(4) dd { grid-area: 2 / 4; }
/* 좁아지면 한 열로: 등록 → 마감 → 수요기관 → 계약 */
@container (max-width: 280px) {
  .bid-dates { grid-template-columns: max-content minmax(0, 1fr); }
  .bid-dates > div:nth-child(n) dt { grid-area: auto / 1; }
  .bid-dates > div:nth-child(n) dd { grid-area: auto / 2; margin-right: 0; }
}
.bid-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bid-actions { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.star { width: var(--ctl-sm); height: var(--ctl-sm); border-radius: 50%; border: 1px solid var(--line); background: var(--card-solid); cursor: pointer; display: grid; place-items: center; padding: 0; }
.star svg { width: 17px; height: 17px; fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linejoin: round; }
.star[aria-pressed="true"] { background: var(--navy-800); border-color: var(--navy-800); }
.star[aria-pressed="true"] svg { fill: var(--signal); stroke: var(--signal); }
.star:not(:disabled):hover { border-color: var(--navy-300); }
.star[aria-pressed="true"]:not(:disabled):hover { border-color: var(--signal); }
.star:disabled { opacity: .5; cursor: wait; }
.btn, .circle-btn, .star, .chip, .toggle, .select, .search { transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
/* 카드 하단 적합도 (상세 패널 점수와 동일) */
.fit-pill { display: inline-flex; align-items: center; gap: 8px; height: var(--ctl-sm); padding: 0 14px 0 6px; border: 0; border-radius: var(--pill); background: var(--navy-50); color: var(--navy-800); font: inherit; font-size: var(--fs-xs); font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.fit-pill:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(19, 28, 51, .12); }
.fit-pill:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 2px; }
.fit-pill b { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: var(--pill); background: var(--navy-800); color: #fff; font-size: 13px; }
.fit-pill[data-v="적극 검토"] { background: #FFF6D6; color: #5A4300; }
.fit-pill[data-v="적극 검토"] b { background: var(--signal); color: #3A2B00; }
.fit-pill[data-v="검토"] b { background: var(--navy-700); }
.fit-pill[data-v="보류"] { background: #F1F2F5; color: var(--ink-3); }
.fit-pill[data-v="보류"] b { background: #B7BCC8; }
.fit-pill.is-failed { padding: 0 14px; background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }

/* 즐겨찾기 카드 */
.fav-extra { display: grid; gap: 8px; margin-top: 12px; }
.status-sel { height: var(--ctl-sm); justify-self: start; background-color: var(--card-solid); border-color: var(--line); font-size: var(--fs-xs); background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px; }
.status-sel[data-s="검토 중"] { background-color: var(--violet-soft); color: var(--violet); border-color: transparent; }
.status-sel[data-s="참여 예정"] { background-color: var(--ok-soft); color: var(--ok); border-color: transparent; }
.status-sel[data-s="제출 완료"] { background-color: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.status-sel[data-s="불참"] { color: var(--ink-3); }
.memo { width: 100%; height: var(--ctl-sm); border: 1px solid transparent; border-radius: 12px; padding: 0 12px; background: var(--well); font-size: var(--fs-s); }
.memo:hover { border-color: var(--line); }
.memo:focus { outline: none; border-color: var(--navy-300); background: var(--card-solid); }
.fav-meta { font-size: 11px; color: var(--ink-3); margin: 0; }

.act { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-height: 65vh; overflow: auto; }
.act li { font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.5; padding-left: 14px; position: relative; }
.act li::before { content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--navy-300); }
.act li b { color: var(--ink); }
.act time { display: block; color: var(--ink-3); font-size: 11px; }

/* ---------- 빈 상태·로딩 ---------- */
.empty { background: var(--card); border: 1px dashed var(--navy-300); border-radius: var(--r-card); padding: 44px 20px; text-align: center; color: var(--ink-2); }
.empty h3 { margin: 0 0 6px; color: var(--ink); font-size: var(--fs-l); font-weight: 700; }
.empty p { margin: 0 0 16px; }
.empty .btn + .btn { margin-left: 6px; }
.empty.is-error { border-color: #E3B3A8; background: rgba(255, 248, 246, .85); }
.skeleton { height: 280px; border-radius: var(--r-card); background: linear-gradient(90deg, rgba(255,255,255,.5), rgba(255,255,255,.9), rgba(255,255,255,.5)); background-size: 200% 100%; animation: sk 1.4s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.more { display: flex; justify-content: center; margin-top: 18px; }

/* ---------- 키워드 관리 ---------- */
.tabs { display: inline-flex; gap: 2px; padding: 5px; margin-bottom: 14px; background: var(--card); border: 1px solid var(--card-line); border-radius: var(--pill); }
.tab { height: 34px; padding: 0 18px; border: 0; background: none; font-weight: 600; font-size: var(--fs-s); color: var(--ink-2); cursor: pointer; border-radius: var(--pill); }
.tab[aria-selected="true"] { background: var(--navy-800); color: #fff; }
.kw-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.panel { background: var(--card); border: 1px solid var(--card-line); backdrop-filter: blur(14px); border-radius: var(--r-card); padding: 22px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 4px; font-size: var(--fs-l); font-weight: 700; }
.panel .desc { margin: 0 0 14px; font-size: var(--fs-xs); color: var(--ink-3); }
.saved-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.saved-tags .tag { height: 26px; font-size: var(--fs-xs); padding: 0 11px; }
.kw-meta { font-size: var(--fs-xs); color: var(--ink-3); margin: 0 0 14px; }
.kw-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
.kw-actions .hint { margin: 0 0 0 4px; }
.rule { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: var(--fs-s); color: var(--ink-2); }
.rule b { display: inline-block; min-width: 56px; color: var(--ink); }
.callout { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--navy-800); color: #fff; border-radius: var(--r-card); font-size: var(--fs-s); font-weight: 600; }
.callout .btn--primary { background: var(--signal); border-color: var(--signal); color: #3A2B00; }
.counter { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; float: right; }
.counter.is-over { color: var(--danger); }

/* ---------- 분석 패널 ---------- */
.drawer { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(19, 28, 51, .32); opacity: 0; transition: opacity .2s; }
.drawer-panel { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(560px, calc(100% - 24px)); background: var(--card-solid); border-radius: var(--r-card); transform: translateX(calc(100% + 24px)); transition: transform .25s ease; display: flex; flex-direction: column; overflow: hidden; }
.drawer.is-open { pointer-events: auto; }
.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; gap: 12px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line-2); }
.drawer-kicker { margin: 0 0 4px; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.drawer-head h2 { margin: 0; font-size: var(--fs-l); line-height: 1.4; font-weight: 700; }
.drawer-body { padding: 20px 24px 40px; overflow: auto; }
.fit { display: flex; align-items: center; gap: 18px; padding: 20px; border-radius: var(--r-card); background: var(--navy-800); color: #fff; margin-bottom: 20px; }
.fit-score { font-size: 52px; font-weight: 300; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.fit-score small { font-size: var(--fs-m); color: var(--navy-300); font-weight: 500; }
.fit-verdict { display: inline-block; padding: 4px 12px; border-radius: var(--pill); font-size: var(--fs-s); font-weight: 700; background: rgba(255,255,255,.14); }
.fit-verdict[data-v="적극 검토"] { background: var(--signal); color: #3A2B00; }
.fit-verdict[data-v="검토"] { background: #fff; color: var(--navy-800); }
.fit p { margin: 8px 0 0; font-size: var(--fs-xs); color: var(--navy-300); }
.a-sec { margin-bottom: 22px; }
.a-sec h3 { font-size: var(--fs-s); margin: 0 0 10px; color: var(--ink); font-weight: 700; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: var(--fs-s); margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-s); }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 6px; }
.checks .q { font-size: var(--fs-xs); color: var(--ink-3); grid-column: 2; }
.mark { font-weight: 800; }
.mark--y { color: var(--ok); }
.mark--n { color: var(--ink-3); }
.mark--x { color: var(--danger); }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 150px 1fr 34px; gap: 10px; align-items: center; font-size: var(--fs-xs); }
.bar i { display: block; height: 8px; border-radius: var(--pill); background: var(--navy-50); overflow: hidden; }
.bar i span { display: block; height: 100%; background: var(--navy-700); border-radius: var(--pill); }
.bar.v i span { background: var(--violet); }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-s); }
.reasons .p { color: var(--ok); font-weight: 700; }
.reasons .m { color: var(--danger); font-weight: 700; }
.upload { border: 1.5px dashed var(--navy-300); border-radius: var(--r-card); padding: 20px; text-align: center; color: var(--ink-2); font-size: var(--fs-s); margin-top: 14px; }
.upload.is-over { border-color: var(--navy-700); background: var(--navy-50); }
.tried { font-size: var(--fs-xs); color: var(--ink-3); margin: 8px 0 0; padding-left: 16px; }
.a-foot { font-size: var(--fs-xs); color: var(--ink-3); border-top: 1px solid var(--line-2); padding-top: 12px; }

/* ---------- 모달 / 토스트 ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; }
.modal-scrim { position: absolute; inset: 0; background: rgba(19, 28, 51, .36); }
.modal-panel { position: relative; width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--card-solid); border-radius: var(--r-card); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 0; }
.modal-head h2 { margin: 0; font-size: var(--fs-l); font-weight: 700; }
.modal-body { padding: 14px 22px 22px; font-size: var(--fs-s); }
.modal-body ol { padding-left: 18px; color: var(--ink-2); line-height: 1.8; }
.modal-body code { background: var(--well); padding: 1px 6px; border-radius: 6px; font-size: 12px; word-break: break-all; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: var(--pill); font-size: var(--fs-s); font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; display: flex; gap: 12px; align-items: center; }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.is-error { background: var(--danger); }
.toast button { background: none; border: 0; color: var(--signal); font-weight: 700; cursor: pointer; padding: 0; }

/* ---------- 반응형 ---------- */
@media (max-width: 900px) { .kw-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .app, .app.is-collapsed { grid-template-columns: 1fr; }
  .lnb { position: sticky; z-index: 15; height: auto; flex-direction: row; align-items: center; gap: 6px; padding: 10px 12px; overflow-x: auto; }
  .brand { font-size: 18px; margin: 0 6px 0 0; padding: 0 4px; }
  .brand-full { display: inline !important; }
  .brand-mini { display: none !important; }
  .menu { display: flex; gap: 4px; }
  .menu a { height: 38px; padding: 0 12px !important; gap: 8px; font-size: var(--fs-s); }
  .label { display: inline !important; }
  .count { position: static !important; width: auto !important; height: auto !important; font-size: 11px !important; padding: 1px 7px !important; }
  .lnb-toggle { display: none; }
  .main { padding: 12px 14px 32px; }
  .hero h1 { font-size: 30px; white-space: nowrap; }
  .topbar .sync { display: none; }
  .bid { padding: 16px; }
  .toolbar--split .chips, .tools { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; }
  .toolbar--split .chips::-webkit-scrollbar, .tools::-webkit-scrollbar { display: none; }
  .chip, .tools > * { flex: none; }
  .tools { justify-content: flex-start; }
  .search.is-open input { width: 160px; }
  .bar { grid-template-columns: 110px 1fr 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
