/* ============================================================
   선정평가 시스템 — 화면 스타일
   색·간격은 tokens.css 변수만 쓴다. 각 구역의 모바일 규칙은 구역 끝에 함께 둔다.
   ============================================================ */

/* ── 1. 기반 ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* 바탕의 은은한 빛 번짐 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 0% -10%, rgba(14, 165, 233, 0.07), transparent 60%),
    radial-gradient(800px 600px at 110% 110%, rgba(99, 102, 241, 0.06), transparent 60%);
}
img { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.3; font-weight: 700; letter-spacing: -0.025em; color: var(--text); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; }
sup { color: var(--amber-t); }
.num, .n { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

::selection { background: rgba(56, 189, 248, 0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 2px; }
::placeholder { color: var(--muted); opacity: 0.75; }
* { scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-3); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ── 2. 버튼 ─────────────────────────────────────────────── */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--card-2); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
  cursor: pointer; box-shadow: var(--sh-1);
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .12s var(--ease), filter .18s var(--ease), box-shadow .18s var(--ease);
}
.btn .ic { width: 17px; height: 17px; }
.btn:hover { background: var(--hover); border-color: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; filter: none; }
.btn-primary { background: var(--grad-primary); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), var(--sh-primary); }
.btn-primary:hover { background: var(--grad-primary); border-color: transparent; filter: brightness(1.1); }
.btn-ok { background: var(--grad-green); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-ok:hover { background: var(--grad-green); border-color: transparent; filter: brightness(1.1); }
.btn-danger { background: transparent; border-color: var(--red-edge); color: var(--red-t); box-shadow: none; }
.btn-danger:hover { background: var(--red-face); border-color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--card-2); border-color: var(--line-2); color: var(--text); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-lg { height: 48px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-link {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--primary-2);
  text-decoration: underline; text-decoration-color: var(--primary-edge); text-underline-offset: 3px;
}
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; flex: none;
  border: 0; border-radius: 10px; background: transparent; color: var(--text-2); cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.icon-btn:hover { background: var(--card-2); color: var(--text); }
.icon-btn.del:hover { background: var(--red-face); color: var(--red-t); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  .btn { height: var(--tap); }
  .btn-sm { height: 38px; }
  .btn-lg { height: 52px; }
}

/* ── 3. 입력 ─────────────────────────────────────────────── */
input, select, textarea {
  width: 100%; min-width: 0; height: 46px; padding: 0 13px;
  font: inherit; font-size: 14.5px; color: var(--text);
  background-color: var(--inset); border: 1px solid var(--line-2); border-radius: 10px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
}
textarea { height: auto; min-height: 100px; padding: 11px 13px; line-height: 1.6; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); background-color: #0b172a; }
/* 기본 화살표 대신 그린 화살표. 오른쪽 끝에서 20px(입력 여백 13px + 7px) 안쪽에 둔다 */
select {
  cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aab6c8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 20px center; background-size: 16px;
}
select::-ms-expand { display: none; }
select option { background-color: var(--card-2); color: var(--text); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.75); cursor: pointer; }
input[type="number"] { font-variant-numeric: tabular-nums; }
/* 플로팅 라벨: 라벨이 입력란 윗테두리에 걸린다.
   라벨과 입력란 배경은 필드가 놓인 면(--fl-bg)과 같은 색이라 테두리만 끊겨 보인다.
   비어 있고 포커스가 없으면 라벨이 입력란 안에 놓인다(:placeholder-shown 이용, placeholder 속성 필요). */
.field { --fl-bg: var(--card); --fl-h: 46px; position: relative; display: flex; flex-direction: column; gap: 7px; min-width: 0; padding-top: 9px; }
.field > span {
  position: absolute; left: 9px; top: 9px; z-index: 1; transform: translateY(-50%);
  display: flex; align-items: center; gap: 5px; max-width: calc(100% - 18px); overflow: hidden;
  padding: 0 6px; font-size: 12.5px; font-weight: 600; line-height: 18px; white-space: nowrap;
  color: var(--text-2); background: var(--fl-bg); pointer-events: none;
  transition: top .18s var(--ease), font-size .18s var(--ease), color .18s var(--ease);
}
.field > span .ic { width: 14px; height: 14px; color: currentColor; opacity: .8; }
.field input, .field select, .field textarea,
.field input:focus, .field select:focus, .field textarea:focus { background-color: var(--fl-bg); }
.field textarea { padding-top: 14px; }
.field:focus-within > span { color: var(--primary-2); }
.field:has(> input:placeholder-shown:not(:focus), > textarea:placeholder-shown:not(:focus), > .input-row > input:placeholder-shown:not(:focus)) > span {
  top: calc(9px + var(--fl-h) / 2); font-size: 14.5px; font-weight: 500; color: var(--muted);
}
.field:has(> textarea:placeholder-shown:not(:focus)) > span { top: 35px; }
.field :is(input, textarea):not(:focus)::placeholder { color: transparent; }
.field:has(.code-input) { --fl-h: 68px; }
.field .hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.form-grid .span2 { grid-column: 1 / -1; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }
.input-row .btn { height: auto; }
.err { color: var(--red-t); font-size: 13px; min-height: 18px; }
label.check { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; }
label.check input { width: 18px; height: 18px; padding: 0; margin: 2px 0 0; accent-color: var(--primary); }

/* 스위치 */
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { position: relative; width: 38px; height: 22px; flex: none; border-radius: 99px; background: var(--line-3); transition: background-color .2s var(--ease); }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform .2s var(--ease); }
.switch input:checked + .sw { background: var(--primary); }
.switch input:checked + .sw::after { transform: translateX(16px); }
.switch input:focus-visible + .sw { box-shadow: var(--ring); }

@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; gap: 18px; } }
/* iOS 는 16px 미만 입력란에 포커스하면 화면을 확대한다 */
@media (max-width: 640px) { input, select, textarea { font-size: 16px; height: 50px; } textarea { height: auto; } .field { --fl-h: 50px; } }

/* ── 4. 배지·타일·아바타 ────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  border-radius: 99px; border: 1px solid var(--line-2); background: var(--card-2);
  font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.pill .ic { width: 13px; height: 13px; }
.pill.accent { background: var(--primary-face); border-color: var(--primary-edge); color: var(--primary-2); }
.pill.green { background: var(--green-face); border-color: var(--green-edge); color: var(--green-t); }
.pill.amber { background: var(--amber-face); border-color: var(--amber-edge); color: var(--amber-t); }
.pill.violet { background: var(--violet-face); border-color: var(--violet-edge); color: var(--violet-t); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 99px; border: 1px solid var(--line-2); background: var(--card-2);
  font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip.blue { background: var(--primary-face); border-color: var(--primary-edge); color: var(--primary-2); }
.chip.green { background: var(--green-face); border-color: var(--green-edge); color: var(--green-t); }
.chip.red { background: var(--red-face); border-color: var(--red-edge); color: var(--red-t); }
.chip.amber { background: var(--amber-face); border-color: var(--amber-edge); color: var(--amber-t); }

.status-pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; border: 1px solid; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.status-pill.ok { color: var(--green-t); background: var(--green-face); border-color: var(--green-edge); }
.status-pill.warn { color: var(--amber-t); background: var(--amber-face); border-color: var(--amber-edge); }

.tile {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: 12px; background: var(--primary-face); color: var(--primary-2);
  box-shadow: inset 0 0 0 1px var(--primary-edge);
}
.tile .ic { width: 20px; height: 20px; }
.tile.violet { background: var(--violet-face); color: var(--violet-t); box-shadow: inset 0 0 0 1px var(--violet-edge); }
.tile.green { background: var(--green-face); color: var(--green-t); box-shadow: inset 0 0 0 1px var(--green-edge); }
.tile.amber { background: var(--amber-face); color: var(--amber-t); box-shadow: inset 0 0 0 1px var(--amber-edge); }
.tile.red { background: var(--red-face); color: var(--red-t); box-shadow: inset 0 0 0 1px var(--red-edge); }
.tile.lg { width: 56px; height: 56px; border-radius: 16px; }
.tile.lg .ic { width: 26px; height: 26px; }

.avatar {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: var(--grad-brand); color: #fff;
  font-size: 14px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.avatar[data-tone="1"] { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.avatar[data-tone="2"] { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.avatar[data-tone="3"] { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.avatar[data-tone="4"] { background: linear-gradient(135deg, #06b6d4, #3b82f6); }

.brand-mark {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; padding: 6px;
  border-radius: 11px; background: var(--paper);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 8px 18px -8px rgba(14, 165, 233, .6);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ── 5. 카드·패널·알림 ──────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-card); }
.panel { padding: 24px; }
.panel-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.ph-text { flex: 1; min-width: 0; padding-top: 1px; }
.ph-text h2 { font-size: 16.5px; font-weight: 700; }
.ph-text p { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.ph-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.panel-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-tools select { width: auto; max-width: 100%; }
.panel-tools > * { height: 46px; }
.panel-tools .sum-badge { order: 9; margin-left: auto; height: 46px; padding: 0 16px; font-size: 15px; border-radius: 10px; }
@media (max-width: 640px) { .panel-tools > *, .panel-tools .sum-badge { height: 50px; } .panel-tools select { flex: 1 1 0; min-width: 0; } .panel-tools .sum-badge { padding: 0 12px; font-size: 14px; } }
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.foot-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.foot-note .ic { width: 15px; height: 15px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.banner {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px;
  padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--card);
  font-size: 13.5px; color: var(--text-2);
}
.banner > .ic { width: 20px; height: 20px; margin-top: 1px; }
.banner b { display: block; color: var(--text); font-size: 14px; }
.banner span { display: block; margin-top: 2px; }
.banner.amber { background: var(--amber-face); border-color: var(--amber-edge); }
.banner.amber > .ic { color: var(--amber-t); }
.banner.red { background: var(--red-face); border-color: var(--red-edge); }
.banner.red > .ic { color: var(--red-t); }
.banner.blue { background: var(--green-face); border-color: var(--green-edge); }
.banner.blue > .ic { color: var(--green-t); }

.mode-note {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 12.5px; color: var(--amber-t);
  background: var(--amber-face); border: 1px solid var(--amber-edge);
}
.mode-note .ic { width: 16px; height: 16px; }

.empty { padding: 56px 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty h2 { font-size: 20px; margin-top: 6px; }
.empty p { color: var(--muted); max-width: 34em; }
.empty .toolbar { justify-content: center; margin-top: 10px; }
.empty-inline { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 16px; color: var(--muted); text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty-inline .ic { width: 28px; height: 28px; }
.flow { list-style: none; padding: 0; margin-top: 32px; width: 100%; max-width: 760px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: flow; }
.flow li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 12px 16px; border-radius: 14px; background: var(--inset); border: 1px solid var(--line); counter-increment: flow; }
.flow li::before { content: counter(flow, decimal-leading-zero); position: absolute; top: 10px; left: 12px; font: 700 11px var(--mono); color: var(--muted); }
.flow b { font-size: 14px; margin-top: 4px; }
.flow small { font-size: 12px; color: var(--muted); }

.loading { min-height: 60vh; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); }
.loading::before { content: ""; width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--primary-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
pre.copy { white-space: pre-wrap; max-height: 320px; overflow: auto; margin: 0; padding: 14px; border-radius: 10px; background: var(--inset); border: 1px solid var(--line-2); font: inherit; font-size: 13px; color: var(--text-2); }

@media (max-width: 640px) {
  .panel { padding: 18px; }
  .panel-head { gap: 12px; margin-bottom: 16px; }
  .panel-head .tile { width: 36px; height: 36px; border-radius: 10px; }
  .ph-right { width: 100%; justify-content: flex-start; margin-left: 0; }
  .panel-head { flex-wrap: wrap; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .empty { padding: 40px 20px; }
}

/* ── 6. 시작(로그인) 화면 ───────────────────────────────── */
.auth-page { min-height: 100dvh; display: flex; flex-direction: column; position: relative; isolation: isolate; overflow: hidden; }
.auth-page::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 80%);
}
.auth-page::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 520px; height: 520px; right: -120px; top: 10%;
  background: radial-gradient(circle, rgba(99, 102, 241, .16), transparent 65%);
  filter: blur(10px);
}
.auth { flex: 1; width: 100%; max-width: 1028px; margin: 0 auto; padding: 64px 24px; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 80px; align-items: center; }

.auth-card {
  position: relative; padding: 32px; border-radius: var(--r-xl);
  background: var(--card); border: 1px solid var(--line-2);
  box-shadow: var(--sh-pop);
  display: flex; flex-direction: column;
}
.auth-card::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--primary-2), transparent); }
.auth-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.auth-head .brand-mark { width: 46px; height: 46px; border-radius: 13px; }
.auth-head h2 { font-size: 20px; font-weight: 800; }
.auth-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.role { position: relative; cursor: pointer; }
.role input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.role-box {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 14px 14px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--inset);
  transition: border-color .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease);
}
.role-box .ic { width: 22px; height: 22px; color: var(--muted); margin-bottom: 6px; }
.role-box b { font-size: 14.5px; }
.role-box small { font-size: 12px; color: var(--muted); }
.role:hover .role-box { border-color: var(--line-3); }
.role input:checked + .role-box { border-color: var(--primary); background: var(--primary-face); box-shadow: var(--ring); }
.role input:checked + .role-box .ic { color: var(--primary-2); }
.role input:focus-visible + .role-box { outline: 2px solid var(--primary-2); outline-offset: 2px; }
.role-panel { display: flex; flex-direction: column; gap: 6px; }
.auth-card:has(#role-admin:checked) .panel-ev { display: none; }
.auth-card:not(:has(#role-admin:checked)) .panel-admin { display: none; }
.code-input {
  height: 68px; text-align: center; text-transform: uppercase;
  font: 700 28px/1 var(--mono); letter-spacing: .42em; text-indent: .42em;
  color: var(--primary-2); background: #050a13; border-color: var(--line-3);
}
.code-input::placeholder { color: var(--line-3); opacity: 1; }
.role-panel .btn-lg { margin-top: 4px; }
.resume {
  width: 100%; margin-top: 12px; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-3); background: transparent;
  font: inherit; font-size: 13.5px; color: var(--text-2); text-align: left; cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.resume:hover { border-color: var(--primary-edge); background: var(--primary-face); }
.resume b { font-family: var(--mono); color: var(--primary-2); letter-spacing: .08em; }
.resume .ic:last-child { margin-left: auto; color: var(--muted); }
.hint-line { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.hint-line .ic { width: 15px; height: 15px; margin-top: 2px; }
.auth-card .mode-note { margin-top: 20px; }
.auth-foot { padding: 20px 24px 28px; text-align: center; font-size: 12.5px; color: var(--muted); }

@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; gap: 24px; padding: 32px 16px 24px; max-width: 520px; }
  /* 휴대폰: 제목·부제 → 입장 카드. 화살표는 숨긴다 */
  .auth-card { padding: 22px; }
  .auth-page::after { display: none; }
}

/* ── 7. 상단바 ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: var(--z-bar);
  height: var(--top-h); display: flex; align-items: center; gap: 12px;
  padding: 0 var(--gutter);
  background: var(--glass); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
}
/* 위원 화면: 상단바 내용 끝을 본문(.wrap 1200px) 끝에 맞춘다 */
.topbar:not(.app-top) { padding-inline: calc(var(--gutter) + max(0px, (100% - 1200px) / 2)); }
.tb-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tb-title { min-width: 0; line-height: 1.25; }
.tb-title b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -0.03em; }
.tb-title small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); line-height: 1.25; }
.user-chip .avatar { width: 32px; height: 32px; font-size: 13px; }
.user-chip b { display: block; font-size: 13.5px; font-weight: 600; }
.user-chip small { display: block; font-size: 11.5px; color: var(--muted); }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; color: var(--muted); }
.crumbs .ic { width: 14px; height: 14px; }
.crumbs b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs span { white-space: nowrap; }

@media (max-width: 640px) {
  .user-chip { padding: 3px; }
  .user-chip > div { display: none; }
  .tb-title small { display: none; }
  .crumbs > span, .crumbs > .ic { display: none; }
  .status-pill { height: 28px; padding: 0 10px; font-size: 12px; }
}

/* ── 8. 담당자 셸: 사이드바 + 본문 ──────────────────────── */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100dvh; background: linear-gradient(90deg, var(--surface) calc(var(--nav-w) - 1px), var(--line) calc(var(--nav-w) - 1px), var(--line) var(--nav-w), transparent var(--nav-w)); }
.nav {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line);
}
.nav-brand { height: var(--top-h); flex: none; display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.nav-x { display: none; margin-left: auto; }
.nav-new { padding: 18px 16px 6px; }
.nav-label { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.nav-count { min-width: 22px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 6px; background: var(--card-2); font: 600 11px var(--mono); color: var(--text-2); letter-spacing: 0; }
.side-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 4px; padding: 0 12px 12px; }
.side-item {
  position: relative; display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: none;
  color: var(--text); font: inherit; cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.side-item:hover { background: var(--card); }
.side-item.on { background: linear-gradient(90deg, rgba(14, 165, 233, .16), rgba(14, 165, 233, .04)); border-color: var(--primary-edge); }
.side-item.on::before { content: ""; position: absolute; left: -12px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary-2); }
.si-ic { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 14px; background: rgba(14, 165, 233, .16); border: 1px solid var(--primary-edge); color: var(--primary-2); }
.si-ic .ic { width: 27px; height: 27px; }
.side-item.on .si-ic { background: var(--grad-primary); color: #fff; }
.si-txt { flex: 1; min-width: 0; }
/* 두 줄: 연도 / 사업명(한 줄, 넘치면 말줄임). 아이콘 27px, 박스 안쪽 여백 11.5px(박스 50px) */
.si-txt b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 600; line-height: 20px; }
.si-txt small { display: block; font-size: 14px; font-weight: 600; line-height: 20px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.nav-empty { padding: 14px 10px; font-size: 13px; color: var(--muted); }
.nav-foot { flex: none; padding: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; transition: background-color .18s var(--ease), color .18s var(--ease); }
.nav-link:hover { background: var(--card); color: var(--text); }
.user-card { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px 8px 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); line-height: 1.3; }
.user-card > div { flex: 1; min-width: 0; }
.user-card b { display: block; font-size: 13.5px; }
.user-card small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-scrim { display: none; }
.nav-open { display: none; }

.shell-main { min-width: 0; display: flex; flex-direction: column; }
/* 본문은 사이드바 옆 영역을 꽉 채운다. 상단바·본문·저장바 모두 좌우 여백이 --gutter 라 끝이 맞는다 */
.main { width: 100%; padding: 28px var(--gutter) 128px; }

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .nav {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: var(--z-nav);
    width: min(86vw, 320px); height: auto;
    transform: translateX(-102%); transition: transform .32s var(--ease);
    box-shadow: var(--sh-pop);
  }
  body.nav-open .nav { transform: none; }
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: var(--z-scrim); background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
  body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .nav-x, .nav-open { display: inline-grid; }
  .main { padding-top: 18px; padding-bottom: 150px; }
}

/* ── 9. 평가 머리(히어로)·지표 카드·탭 ─────────────────── */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 28px 32px; margin-bottom: 20px;
  border-radius: var(--r-xl); border: 1px solid var(--line-2); background: var(--grad-hero);
  box-shadow: var(--sh-card);
}
.hero::before { content: ""; position: absolute; z-index: -1; width: 280px; height: 280px; right: -70px; top: -110px; border-radius: 50%; background: rgba(14, 165, 233, .22); filter: blur(70px); }
.hero::after { content: ""; position: absolute; z-index: -1; width: 220px; height: 220px; left: 38%; bottom: -150px; border-radius: 50%; background: rgba(124, 58, 237, .16); filter: blur(60px); }
.hero-text { min-width: 0; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.035em; }
.meta { list-style: none; padding: 0; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.meta li { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); min-width: 0; }
.meta .ic { width: 15px; height: 15px; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 20px; }
.kpi { display: flex; align-items: center; gap: 14px; padding: 18px 20px; min-width: 0; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-card); }
.kpi .tile { width: 46px; height: 46px; border-radius: 13px; }
.kpi .tile .ic { width: 22px; height: 22px; }
.kpi-v { min-width: 0; }
.kpi-v b { display: block; font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-v b small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi-v > span { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.kpi-text { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; white-space: normal; }

.tabs {
  position: sticky; top: var(--top-h); z-index: var(--z-sticky);
  display: flex; gap: 4px; margin: 0 calc(var(--gutter) * -1) 24px; padding: 0 var(--gutter);
  background: var(--glass-bg); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none; flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 14px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.tab .ic { width: 17px; height: 17px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--primary-2); }
.tab.on .ic { color: var(--primary-2); }
.tab-count { min-width: 20px; height: 20px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--card-2); font: 600 11px var(--mono); color: var(--text-2); }
.tab-count:empty { display: none; }
.tab.on .tab-count { background: var(--primary-face); color: var(--primary-2); }

.savebar {
  /* 본문 맨 끝에 놓이고 화면 아래에 붙는다. 오른쪽 끝이 본문 내용 끝과 같다 */
  position: sticky; bottom: max(24px, env(safe-area-inset-bottom));
  z-index: var(--z-savebar); display: none; align-items: center; gap: 12px;
  width: fit-content; max-width: 100%; margin: 24px 0 0 auto; padding: 10px 10px 10px 20px;
  font-size: 14px; color: var(--text);
  background: rgba(20, 33, 57, .96); border: 1px solid var(--primary-edge); border-radius: 14px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--sh-pop), 0 0 0 4px rgba(14, 165, 233, .08);
}
.savebar.show { display: flex; }
.savebar > span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 10px 1px 0; border-radius: 50%; background: var(--amber-t); box-shadow: 0 0 0 3px var(--amber-face); }

@media (max-width: 1200px) { .kpis-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .hero { padding: 20px; flex-direction: column; gap: 14px; border-radius: var(--r-lg); }
  .hero h1 { font-size: 21px; }
  .meta { gap: 6px 14px; }
  .meta li { font-size: 13px; }
  .kpis, .kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
  .kpis-5 .kpi:last-child { grid-column: 1 / -1; }
  .kpi { padding: 14px; gap: 12px; border-radius: 14px; }
  .kpi .tile { width: 38px; height: 38px; border-radius: 11px; }
  .kpi .tile .ic { width: 19px; height: 19px; }
  .kpi-v b { font-size: 21px; }
  .kpi-v b small { font-size: 12.5px; }
  .kpi-v > span { font-size: 12px; }
  .kpi-text { font-size: 14px; }
  .tabs { margin-bottom: 18px; }
  .tab { height: 48px; padding: 0 11px; font-size: 13.5px; gap: 6px; }
  .savebar { width: 100%; bottom: max(12px, env(safe-area-inset-bottom)); flex-wrap: wrap; gap: 8px; padding: 12px; }
  .savebar > span { flex: 1 1 100%; font-size: 13px; }
  .savebar .btn { flex: 1; }
}

/* ── 10. 표 ────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  padding: 11px 14px; text-align: left; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: rgba(148, 163, 184, .04); border-bottom: 1px solid var(--line);
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color .15s var(--ease); }
.tbl tbody tr:hover td { background: rgba(148, 163, 184, .03); }
.tbl .n { text-align: right; }
.tbl .c { text-align: center; }
.tbl.edit td { padding: 7px 8px; }
.tbl.edit input, .tbl.edit select { height: 42px; padding: 0 10px; font-size: 14px; background-color: transparent; border-color: transparent; }
.tbl.edit input:hover, .tbl.edit select:hover { background-color: var(--inset); border-color: var(--line-2); }
.tbl.edit input:focus, .tbl.edit select:focus { background-color: var(--inset); border-color: var(--primary); }
.tbl.edit select { padding-right: 40px; background-position: right 17px center; }
.tbl input.w-num { width: 76px; text-align: right; }
.order { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 8px; background: var(--card-2); font: 700 12.5px var(--mono); color: var(--text-2); }
.icon-btns { display: flex; gap: 2px; justify-content: flex-end; }
.icon-btns .icon-btn { width: 32px; height: 32px; }
.icon-btns .ic { width: 16px; height: 16px; }
.code { display: inline-block; align-self: flex-start; padding: 4px 9px; border-radius: 8px; font: 700 13.5px var(--mono); letter-spacing: .14em; color: var(--primary-2); background: var(--primary-face); border: 1px solid var(--primary-edge); }
.sum-badge { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--green-face); color: var(--green-t); border: 1px solid var(--green-edge); white-space: nowrap; }
.sum-badge.bad { background: var(--red-face); color: var(--red-t); border-color: var(--red-edge); }
.co-name { font-weight: 600; }
.total-cell { font-weight: 800; color: var(--primary-2); }

/* 배점 비율 막대 */
.area-bar { display: flex; gap: 6px; margin-bottom: 18px; }
.ab-seg { min-width: 0; padding: 10px 12px 11px; border-radius: 10px; background: var(--tf); border: 1px solid var(--te); --t: var(--primary-2); --tf: var(--primary-face); --te: var(--primary-edge); }
.ab-seg[data-tone="1"] { --t: var(--violet-t); --tf: var(--violet-face); --te: var(--violet-edge); }
.ab-seg[data-tone="2"] { --t: var(--green-t); --tf: var(--green-face); --te: var(--green-edge); }
.ab-seg[data-tone="3"] { --t: var(--amber-t); --tf: var(--amber-face); --te: var(--amber-edge); }
.ab-seg[data-tone="4"] { --t: var(--cyan-t); --tf: var(--cyan-face); --te: var(--cyan-edge); }
.ab-seg i { display: block; height: 3px; border-radius: 2px; background: var(--t); margin-bottom: 8px; }
.ab-seg span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-seg b { display: block; font-size: 16px; font-weight: 800; color: var(--t); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ab-seg b small { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-left: 3px; }

/* 휴대폰: 편집 표를 행마다 카드로 바꾼다. 칸 이름은 td[data-l] 에서 가져온다 */
@media (max-width: 760px) {
  .tbl-wrap:has(.tbl.edit) { border: 0; background: none; overflow: visible; }
  .tbl.edit, .tbl.edit tbody { display: block; }
  .tbl.edit thead { display: none; }
  .tbl.edit tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; gap: 12px;
    padding: 14px; margin-bottom: 10px;
    background: var(--inset); border: 1px solid var(--line-2); border-radius: 14px;
  }
  .tbl.edit tbody tr:hover td { background: none; }
  .tbl.edit td { display: flex; flex-direction: column; gap: 5px; padding: 0; border: 0; min-width: 0; text-align: left; }
  .tbl.edit td[data-l]::before { content: attr(data-l); font-size: 12px; font-weight: 600; color: var(--muted); }
  /* 카드 안 입력칸도 플로팅 라벨(항상 떠 있는 상태). 배경은 카드(--inset)와 같게 */
  .tbl.edit td[data-l]:not(.num) { position: relative; padding-top: 9px; }
  .tbl.edit td[data-l]:not(.num)::before {
    position: absolute; left: 9px; top: 9px; z-index: 1; transform: translateY(-50%);
    padding: 0 6px; line-height: 18px; background: var(--inset); pointer-events: none;
  }
  .tbl.edit td[data-l]:not(.num):focus-within::before { color: var(--primary-2); }
  .tbl.edit td.wide { grid-column: 1 / -1; }
  .tbl.edit td.acts-cell { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--line); }
  .tbl.edit td.acts-cell .icon-btns, .tbl.edit td.acts-cell .toolbar { width: 100%; justify-content: flex-end; }
  .tbl.edit td.c.num { flex-direction: row; align-items: center; gap: 10px; }
  .tbl.edit input, .tbl.edit select, .tbl.edit input:focus, .tbl.edit select:focus { background-color: var(--inset); border-color: var(--line-2); height: 50px; }
  .tbl.edit input:focus, .tbl.edit select:focus { border-color: var(--primary); }
  .tbl.edit input.w-num { width: 100%; text-align: left; }
  .icon-btns .icon-btn { width: var(--tap); height: 40px; }
  .area-bar { flex-wrap: wrap; }
  .ab-seg { flex: 1 1 calc(50% - 3px) !important; }
}

/* ── 11. 실시간 현황 ───────────────────────────────────── */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.ev-card { min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 14px; background: var(--inset); border: 1px solid var(--line); transition: border-color .18s var(--ease); }
.ev-card:hover { border-color: var(--line-3); }
.ev-card.attention { border-color: var(--amber-edge); background: linear-gradient(180deg, rgba(245, 158, 11, .07), transparent 70%), var(--inset); }
.ev-card .top { display: flex; align-items: center; gap: 12px; }
.ev-card .who { flex: 1; min-width: 0; }
.ev-card .who b { display: block; font-size: 15px; }
.ev-card .sub { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog-row { display: flex; align-items: center; gap: 12px; }
.prog-row .bar { flex: 1; }
.pct { font: 600 12.5px var(--mono); color: var(--text-2); }
.bar { height: 6px; border-radius: 99px; background: rgba(148, 163, 184, .12); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--grad-brand); transition: width .5s var(--ease); }
.flags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.flags li { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--card); border: 1px solid var(--line); }
.flags .ic { width: 12px; height: 12px; stroke-width: 2.25; }
.flags li.ok { color: var(--green-t); background: var(--green-face); border-color: var(--green-edge); }
.flags li.warn { color: var(--amber-t); background: var(--amber-face); border-color: var(--amber-edge); }
.when { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.when .ic { width: 14px; height: 14px; }
.ev-card .acts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }

.rank-tbl td { white-space: nowrap; }
.rank-tbl td.rank { width: 64px; text-align: center; }
.rank-badge { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 9px; background: var(--card-2); font: 700 13.5px var(--mono); color: var(--text-2); }
.rank-badge.top { background: var(--grad-brand); color: #fff; box-shadow: 0 6px 14px -6px rgba(14, 165, 233, .7); }
.co-cell { white-space: normal; min-width: 180px; }
.co-cell b { display: block; font-size: 14.5px; font-weight: 600; }
.co-cell .small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.rank-tbl tr.row { cursor: pointer; }
.rank-tbl tr.sel td { background: rgba(16, 185, 129, .045); }
.rank-tbl td.score { font-size: 15px; font-weight: 800; color: var(--primary-2); }
.rank-tbl .dev { color: var(--red-t); font-weight: 700; }
.rank-tbl .dev::after { content: " ▲"; font-size: 10px; }
.rank-tbl .dim { color: var(--muted); }
.rank-tbl tr.cut td { padding: 0; height: 0; border-bottom: 0; }
.cutline { position: relative; border-top: 1.5px dashed var(--red-edge); }
.cutline span { position: absolute; right: 16px; top: -12px; height: 22px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 99px; font-size: 11.5px; font-weight: 700; color: var(--red-t); background: var(--card); border: 1px solid var(--red-edge); }
/* 가로로 스크롤해도 순위·기업명이 보이게 앞 두 칸 고정 */
.rank-tbl th:nth-child(-n+2), .rank-tbl tr.row td:nth-child(-n+2) { position: sticky; z-index: 1; background: var(--card); }
.rank-tbl th:nth-child(-n+2) { background: linear-gradient(rgba(148, 163, 184, .04), rgba(148, 163, 184, .04)), var(--card); }
.rank-tbl th:first-child, .rank-tbl tr.row td:first-child { left: 0; }
.rank-tbl th:nth-child(2), .rank-tbl tr.row td:nth-child(2) { left: 64px; box-shadow: 1px 0 0 var(--line); }
.rank-tbl tr.sel td:nth-child(-n+2) { background: linear-gradient(rgba(16, 185, 129, .045), rgba(16, 185, 129, .045)), var(--card); }
.detail td { background: var(--inset); padding: 20px !important; white-space: normal; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; }
.dt { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.dt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dt-row .dt { margin: 0; }
.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini th, .mini td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.mini th { font-size: 12px; font-weight: 600; color: var(--muted); }
.mini .n { text-align: right; }
.comments { display: flex; flex-direction: column; gap: 8px; }
.comments div { padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.comments b { display: block; font-size: 12px; color: var(--primary-2); margin-bottom: 2px; }
.ai-box { padding: 12px 14px; border-radius: 10px; white-space: pre-wrap; font-size: 13px; background: var(--primary-face); border: 1px solid var(--primary-edge); }
.tbl-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.tbl-note .ic { width: 15px; height: 15px; margin-top: 2px; }

.doc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.doc-card { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-card); transition: border-color .18s var(--ease), transform .18s var(--ease); }
.doc-card:hover { border-color: var(--line-3); transform: translateY(-2px); }
.doc-card h3 { font-size: 17px; margin-top: 8px; }
.doc-card p { flex: 1; font-size: 13.5px; color: var(--muted); }
.doc-card .btn { margin-top: 8px; }

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .doc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ev-grid { grid-template-columns: 1fr; }
  .rank-tbl td.rank { width: 48px; }
  .rank-tbl th:nth-child(2), .rank-tbl tr.row td:nth-child(2) { left: 48px; }
  .co-cell { min-width: 120px; }
  .co-cell .small { display: none; }
  .tbl { font-size: 13.5px; }
  .tbl th, .tbl td { padding: 10px; }
  .doc-card { padding: 20px; }
}

/* ── 12. 평가위원: 머리·단계 ────────────────────────────── */
.ev-hero { position: relative; overflow: hidden; isolation: isolate; background: var(--grad-hero); border-bottom: 1px solid var(--line); padding: 28px var(--gutter); }
.ev-hero::before { content: ""; position: absolute; z-index: -1; width: 300px; height: 300px; right: 6%; top: -160px; border-radius: 50%; background: rgba(14, 165, 233, .2); filter: blur(70px); }
.ev-hero .in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; }
.ev-hero-text { min-width: 0; }
.ev-hero h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.035em; margin-top: 10px; }
.stepper { list-style: none; padding: 0; display: flex; align-items: center; }
.stepper li { display: flex; align-items: center; gap: 10px; }
.stepper li + li::before { content: ""; width: 28px; height: 2px; margin: 0 10px; border-radius: 2px; background: var(--line-2); }
.stepper li.done + li::before, .stepper li.done + li.done::before { background: var(--primary-edge); }
.stepper .dot { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line-3); font: 700 13px var(--mono); color: var(--muted); background: var(--inset); }
.stepper .dot .ic { width: 15px; height: 15px; stroke-width: 2.5; }
.stepper .lbl { font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.stepper li.on .dot { background: var(--grad-primary); border-color: transparent; color: #fff; box-shadow: 0 0 0 4px rgba(14, 165, 233, .18); }
.stepper li.on .lbl { color: var(--text); }
.stepper li.done .dot { background: var(--primary-face); border-color: var(--primary-edge); color: var(--primary-2); }
.stepper li.done .lbl { color: var(--text-2); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 28px var(--gutter) 140px; }
.wrap.narrow { max-width: 780px; }
.wrap.wrap-note { padding-bottom: 0; }

@media (max-width: 760px) {
  .ev-hero { padding: 20px var(--gutter) 18px; }
  .ev-hero h1 { font-size: 19px; margin-top: 8px; }
  .stepper { width: 100%; }
  .stepper li + li { flex: 1; }
  .stepper li + li::before { flex: 1; width: auto; margin: 0 8px; }
  .stepper .lbl { display: none; }
  .stepper li.on .lbl { display: inline; }
  .wrap { padding-top: 18px; padding-bottom: 190px; }
}

/* ── 13. 평가위원: 서약·이해관계 ───────────────────────── */
.idcard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--inset); }
.idcard div { padding: 14px 16px; border-right: 1px solid var(--line); min-width: 0; }
.idcard div:last-child { border-right: 0; }
.idcard dt { font-size: 12px; color: var(--muted); }
.idcard dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; }
.pledge-list { list-style: none; padding: 0; display: grid; gap: 8px; counter-reset: pl; }
.pledge-list li { position: relative; padding: 13px 16px 13px 52px; border-radius: 12px; background: var(--inset); border: 1px solid var(--line); font-size: 14px; color: var(--text-2); counter-increment: pl; }
.pledge-list li::before { content: counter(pl); position: absolute; left: 16px; top: 12px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--violet-face); color: var(--violet-t); font: 700 12px var(--mono); }
.conflicts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pick { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--inset); cursor: pointer; transition: border-color .18s var(--ease), background-color .18s var(--ease); }
.pick:hover { border-color: var(--line-3); }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick-no { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--card-2); font: 700 12px var(--mono); color: var(--muted); }
.pick-txt { flex: 1; min-width: 0; }
.pick-txt b { display: block; font-size: 14px; font-weight: 600; }
.pick-txt small { display: block; font-size: 12px; color: var(--muted); }
.pick-box { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 7px; border: 1.5px solid var(--line-3); transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.pick-box .ic { width: 14px; height: 14px; stroke-width: 2.75; color: #fff; opacity: 0; }
.pick:has(input:checked) { border-color: var(--red-edge); background: var(--red-face); }
.pick input:checked ~ .pick-box { background: var(--red); border-color: var(--red); }
.pick input:checked ~ .pick-box .ic { opacity: 1; }
.pick input:focus-visible ~ .pick-box { box-shadow: var(--ring); }
.confirm { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.check-row { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; cursor: pointer; }
.check-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cb { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1.5px solid var(--line-3); background: var(--inset); transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.cb .ic { width: 15px; height: 15px; stroke-width: 2.75; color: #fff; opacity: 0; }
.check-row input:checked + .cb { background: var(--grad-primary); border-color: transparent; }
.check-row input:checked + .cb .ic { opacity: 1; }
.check-row input:focus-visible + .cb { box-shadow: var(--ring); }

@media (max-width: 640px) {
  .idcard { grid-template-columns: 1fr 1fr; }
  .idcard div:nth-child(2) { border-right: 0; }
  .idcard div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .conflicts { grid-template-columns: 1fr; }
  .pick { min-height: 56px; }
  .confirm .btn { width: 100%; }
}

/* ── 14. 평가위원: 서명 ────────────────────────────────── */
.sig-area { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.seg { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 12px; background: var(--inset); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: none; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: background-color .18s var(--ease), color .18s var(--ease); }
.seg button .ic { width: 16px; height: 16px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--card-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--primary-edge); }
.seg button.on .ic { color: var(--primary-2); }
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 36px 20px; text-align: center; cursor: pointer;
  border-radius: var(--r-lg); border: 1.5px dashed var(--line-3); background: var(--inset);
  font-size: 13.5px; color: var(--muted);
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.drop:hover { border-color: var(--primary); background: var(--primary-face); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop b { font-size: 15px; color: var(--text); margin-top: 6px; }
.padbox { position: relative; background: var(--paper); border-radius: 14px; overflow: hidden; touch-action: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3); }
.padbox canvas { display: block; width: 100%; height: 220px; cursor: crosshair; position: relative; z-index: 1; }
.pad-hint { position: absolute; left: 24px; right: 24px; bottom: 44px; border-top: 1px dashed var(--paper-line); padding-top: 6px; text-align: center; font-size: 12px; color: var(--paper-muted); pointer-events: none; }
.pad-tools { margin-top: 10px; }
.sp-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.sig-paper { padding: 16px; text-align: center; color: var(--paper-ink); background: var(--paper); border-radius: 12px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .7); }
.sig-paper .ph { height: 112px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--paper-line); margin-bottom: 8px; }
.sig-paper img { max-height: 100px; max-width: 100%; }
.sig-paper small { font-size: 12px; color: var(--paper-muted); }

@media (max-width: 760px) {
  .sig-area { grid-template-columns: 1fr; }
  .seg { display: flex; }
  .seg button { flex: 1; justify-content: center; }
  .panel-foot .btn-lg { flex: 1; }
}

/* ── 15. 평가위원: 점수 입력 ───────────────────────────── */
.score-layout { display: grid; grid-template-columns: 284px minmax(0, 1fr); gap: 20px; align-items: start; }
.co-list { position: sticky; top: calc(var(--top-h) + 16px); max-height: calc(100dvh - var(--top-h) - 32px); overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.prog { padding: 6px 8px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.prog-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); }
.prog-top b { font: 700 13px var(--mono); color: var(--text-2); }
.prog-top #prog-n { color: var(--primary-2); }
.prog .bar { margin-top: 10px; }
.co-btn {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  padding: 10px; border-radius: 12px; border: 1px solid transparent; background: none;
  color: var(--text); font: inherit; cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.co-btn:hover { background: var(--card-2); }
.co-btn.on { background: var(--primary-face); border-color: var(--primary-edge); }
.co-btn .no { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--card-2); font: 700 12.5px var(--mono); color: var(--muted); }
.co-btn.on .no { background: var(--grad-primary); color: #fff; }
.co-btn.full .no { background: var(--green-face); color: var(--green-t); box-shadow: inset 0 0 0 1px var(--green-edge); }
.co-btn.excl { opacity: .6; }
.co-btn.excl .no { background: none; border: 1.5px dashed var(--line-3); }
.co-btn .nm { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.35; }
.co-btn .nm small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--muted); }
.co-btn.full .nm small { color: var(--green-t); }
.co-btn .tt { font: 700 14px var(--mono); color: var(--text-2); }

.sheet { padding: 28px; }
.co-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 22px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.co-info { min-width: 0; }
.co-info h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.035em; margin-top: 10px; }
.total { flex: none; position: relative; width: 116px; height: 116px; display: grid; place-items: center; text-align: center; }
.total svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.total .ring { transition: stroke-dashoffset .5s var(--ease); }
.total div { position: relative; line-height: 1.1; }
.total b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.total span { font-size: 12px; color: var(--muted); }
.area { padding: 22px 0 6px; }
.area + .area { border-top: 1px solid var(--line); }
.area-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.area-h h3 { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; }
.area-h h3::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--grad-brand); }
.area-h span { padding: 3px 10px; border-radius: 8px; background: var(--inset); border: 1px solid var(--line); font: 700 12.5px var(--mono); color: var(--text-2); }
.crit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: center; padding: 14px 0; }
.crit + .crit { border-top: 1px dashed var(--line); }
.crit-t { display: flex; gap: 12px; min-width: 0; }
.crit-no { flex: none; margin-top: 3px; font: 700 12px var(--mono); color: var(--muted); }
.crit-t b { font-size: 15px; font-weight: 600; }
.crit-t p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.crit-in { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.grades { display: inline-flex; gap: 3px; padding: 3px; border-radius: 11px; background: var(--inset); border: 1px solid var(--line); }
.grades button {
  min-width: 56px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.25; color: var(--text-2); text-align: center;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.grades button small { display: block; margin-top: 1px; font: 500 11px var(--mono); color: var(--muted); }
.grades button:hover { background: var(--card-2); color: var(--text); }
.grades button.on { background: var(--grad-primary); color: #fff; box-shadow: var(--sh-primary); }
.grades button.on small { color: rgba(255, 255, 255, .85); }
.score-in { display: flex; align-items: center; gap: 8px; }
.score-in input { width: 78px; height: 50px; text-align: right; font: 700 18px var(--mono); }
.score-in input.bad { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-face); }
.score-in span { font: 500 13px var(--mono); color: var(--muted); white-space: nowrap; }
.comment-field { margin-top: 22px; }
.sheet-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
.excl-box { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 22px 0; padding: 32px 20px; text-align: center; color: var(--text-2); border: 1.5px dashed var(--line-3); border-radius: 14px; background: var(--inset); }

.submitbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-bar);
  background: var(--glass); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  padding-bottom: env(safe-area-inset-bottom);
}
.submitbar .in { max-width: 1200px; margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 14px; }
.submitbar #btn-review { margin-left: auto; }
.savestate { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.savestate::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--green-t); box-shadow: 0 0 0 3px var(--green-face); }
.savestate.err { color: var(--red-t); }
.savestate.err::before { background: var(--red-t); box-shadow: 0 0 0 3px var(--red-face); }
.sig-mini { height: 40px; display: flex; align-items: center; padding: 3px 10px; border-radius: 8px; background: var(--paper); }
.sig-mini img { max-height: 34px; }
.sig-mini.lg { height: 56px; }
.sig-mini.lg img { max-height: 48px; }
.sign-line { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 16px; }
.sign-line small { display: block; font-size: 12px; color: var(--muted); text-align: right; }
.sign-line b { font-size: 14px; }

.done-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 44px 28px; text-align: center; }
.done-card .mark { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 4px; }
.done-card.ok .mark { background: var(--green-face); color: var(--green-t); box-shadow: inset 0 0 0 1px var(--green-edge), 0 0 40px -6px rgba(16, 185, 129, .5); }
.done-card.ok .mark .ic { width: 42px; height: 42px; stroke-width: 1.5; }
.done-card.wait .mark { background: var(--paper); box-shadow: 0 0 0 6px var(--primary-face), 0 0 40px -6px rgba(14, 165, 233, .6); }
.done-card.wait .mark img { width: 46px; }
.done-card h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.035em; }
.done-card p { max-width: 32em; color: var(--text-2); }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

@media (max-width: 900px) {
  .score-layout { grid-template-columns: 1fr; gap: 14px; }
  /* 휴대폰: 기업 목록을 상단바 아래에 붙는 가로 스크롤 띠로 */
  .co-list {
    top: var(--top-h); z-index: var(--z-sticky); max-height: none;
    flex-direction: row; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    margin: 0 calc(var(--gutter) * -1); padding: 10px var(--gutter);
    border-radius: 0; border-width: 0 0 1px; box-shadow: none;
    background: var(--glass-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    scrollbar-width: none;
  }
  .co-list::-webkit-scrollbar { display: none; }
  .co-list .prog { display: none; }
  .co-list .co-btn { flex: none; width: auto; min-width: 176px; scroll-snap-align: start; background: var(--card); border-color: var(--line-2); }
  .co-list .co-btn.on { background: var(--primary-face); border-color: var(--primary-edge); }
}
@media (max-width: 640px) {
  .sheet { padding: 18px; border-radius: 14px; }
  .co-head { gap: 14px; align-items: flex-start; }
  .co-info h2 { font-size: 20px; }
  .co-head .meta { flex-direction: column; gap: 4px; }
  .total { width: 88px; height: 88px; }
  .total b { font-size: 24px; }
  .crit { grid-template-columns: 1fr; }
  .crit-in { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .grades { flex: 1 1 100%; display: flex; }
  .grades button { flex: 1; min-width: 0; min-height: 52px; padding: 4px 2px; font-size: 12px; white-space: nowrap; }
  .score-in input { height: 46px; }
  .sheet-foot .btn { flex: 1; }
  .submitbar .in { flex-wrap: wrap; gap: 8px 10px; padding: 10px var(--gutter); }
  .submitbar .savestate { flex: 1; font-size: 12px; }
  .submitbar .sig-mini { height: 32px; }
  .submitbar .sig-mini img { max-height: 26px; }
  .submitbar #btn-review { flex: 1 1 100%; margin-left: 0; height: 50px; }
  .done-card { padding: 36px 20px; }
  .done-card h2 { font-size: 22px; }
}
@media (max-width: 360px) { .grades button { font-size: 11px; letter-spacing: -0.04em; } }

/* ── 16. 확인창·알림 ───────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: flex; align-items: flex-start; justify-content: center; padding: 64px 16px; overflow: auto;
  background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fade .2s var(--ease);
}
.modal { width: 100%; max-width: 560px; padding: 26px; color: var(--text); background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--sh-pop); animation: pop .28s var(--ease); }
.modal.wide { max-width: 860px; }
.modal h2 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.modal-head h2 { margin: 0; }
.modal .muted { font-size: 14px; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

#toast {
  position: fixed; top: calc(var(--top-h) + 12px); left: 50%; z-index: var(--z-toast);
  max-width: calc(100% - 32px); padding: 11px 18px;
  font-size: 14px; font-weight: 500; color: var(--text);
  background: var(--card-2); border: 1px solid var(--primary-edge); border-radius: 12px; box-shadow: var(--sh-pop);
  transform: translateX(-50%) translateY(-12px); opacity: 0; pointer-events: none;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

@media (max-width: 640px) {
  /* 휴대폰: 확인창은 아래에서 올라오는 시트로 */
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal, .modal.wide {
    max-width: none; max-height: 92dvh; overflow: auto;
    padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0; border-width: 1px 0 0;
    animation: sheet .32s var(--ease);
  }
  .modal::before { content: ""; display: block; width: 40px; height: 4px; margin: -6px auto 16px; border-radius: 2px; background: var(--line-3); }
  .modal .acts .btn { flex: 1; }
  @keyframes sheet { from { transform: translateY(100%); } }
}

/* ── 17. 입력 추천 목록 (datalist 대체, JS Sug) ─────────── */
.suggest {
  position: fixed; z-index: var(--z-modal); max-height: 288px; overflow-y: auto; overscroll-behavior: contain;
  padding: 6px; background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--sh-pop), 0 0 0 1px rgba(0, 0, 0, .25);
  scrollbar-width: thin; scrollbar-color: var(--line-3) transparent;
  animation: sug-in .16s var(--ease);
}
.suggest[hidden] { display: none; }
.suggest-item {
  position: relative; padding: 10px 36px 10px 12px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 14px; line-height: 1.45; color: var(--text-2); cursor: pointer;
  transition: background-color .12s var(--ease), color .12s var(--ease);
}
.suggest-item + .suggest-item { margin-top: 2px; }
.suggest-item:hover, .suggest-item.on { background: var(--hover); color: var(--text); }
.suggest-item mark { background: none; color: var(--primary-2); font-weight: 700; }
.suggest-item.cur { color: var(--text); font-weight: 600; }
.suggest-item.cur::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 10px; height: 5px; margin-top: -4px;
  border-left: 2px solid var(--primary-2); border-bottom: 2px solid var(--primary-2); transform: rotate(-45deg);
}
@keyframes sug-in { from { opacity: 0; transform: translateY(-4px); } }
@media (max-width: 640px) { .suggest-item { padding-top: 12px; padding-bottom: 12px; font-size: 15px; } }

/* ── 18. 엑셀형 시트 (평가대상 기업·평가위원 명단) ─────────── */
.xl-card { overflow: hidden; }
.xl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 16px 20px 16px 22px; }
.xl-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.xl-title > .ic { width: 20px; height: 20px; color: var(--primary-2); }
.xl-title h2 { font-size: 16.5px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.xl-title p { font-size: 13px; color: var(--muted); }
.xl-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-pill { border-radius: 99px; padding: 0 16px; }
.xl-wrap { max-height: min(640px, 70vh); overflow: auto; overscroll-behavior: contain; background: var(--inset); border-top: 1px solid var(--line-2); scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
.xl thead th { position: sticky; top: 0; z-index: 1; }
.xl .req { margin-left: 3px; color: var(--red-t); font-weight: 700; }
.xl-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line-2); }
.xl { width: 100%; min-width: 720px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.xl-ev { min-width: 1180px; }
.xl.xl-ev .xl-act { width: 52px; }
.xl th, .xl td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; }
.xl tr > :last-child { border-right: 0; }
.xl tbody tr:last-child > * { border-bottom: 0; }
.xl thead th { height: 44px; padding: 0 12px; text-align: left; font-size: 13px; font-weight: 700; color: var(--text-2); background: var(--card-2); border-bottom-color: var(--line-2); white-space: nowrap; transition: color .12s, background-color .12s; }
.xl .xl-no { width: 60px; padding: 0; text-align: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); background: var(--card-2); border-right-color: var(--line-2); transition: color .12s, background-color .12s; }
.xl tbody td { height: 44px; background: transparent; transition: background-color .12s; }
.xl tbody tr:hover td { background: rgba(148, 163, 184, .035); }
.xl .xl-in {
  display: block; width: 100%; height: 44px; padding: 0 12px; border: 0; border-radius: 0;
  font-size: 14px; color: var(--text); background: transparent; box-shadow: none;
}
.xl .xl-in:hover { border: 0; }
.xl .xl-in:focus { outline: 2px solid var(--primary-2); outline-offset: -2px; background: rgba(14, 165, 233, .07); box-shadow: none; }
.xl .xl-in::placeholder { color: var(--muted); opacity: .7; }
.xl tbody tr:focus-within .xl-no { color: var(--primary-2); background: linear-gradient(var(--primary-face), var(--primary-face)), var(--card-2); }
.xl:has(.c-name .xl-in:focus) th.c-name, .xl:has(.c-ceo .xl-in:focus) th.c-ceo, .xl:has(.c-lead .xl-in:focus) th.c-lead, .xl:has(.c-item .xl-in:focus) th.c-item,
.xl:has(.c-role .xl-in:focus) th.c-role, .xl:has(.c-org .xl-in:focus) th.c-org, .xl:has(.c-title .xl-in:focus) th.c-title,
.xl:has(.c-email .xl-in:focus) th.c-email { color: var(--primary-2); background: var(--primary-face); }
.xl-blank .xl-no { opacity: .55; }
/* 열 너비 */
/* 기업 시트: 창업아이템이 남은 너비를 모두 쓴다 */
.xl-co .c-name { width: 240px; } .xl-co .c-ceo, .xl-co .c-lead { width: 130px; }
/* 소속은 고정 폭, 이메일이 남은 폭을 쓴다 */
.xl-ev .c-role { width: 84px; } .xl-ev .c-name { width: 96px; } .xl-ev .c-org { width: 170px; } .xl-ev .c-title { width: 90px; }
.xl .c-sent { width: 172px; } .xl .c-mail { width: 124px; }
.xl .c-code { width: 100px; } .xl .c-share { width: 214px; }
.xl thead .xl-act, .xl .xl-act { width: 104px; }
/* 가로로 밀어도 행 번호는 왼쪽에 남는다 */
.xl .xl-no { position: sticky; left: 0; z-index: 1; }
.xl thead .xl-no { z-index: 2; }
.xl td.c-code, .xl td.c-sent, .xl td.c-mail { padding: 0 10px; }
.xl td.c-code .code { font-size: 12.5px; padding: 3px 8px; }
.xl-act .icon-btns { justify-content: center; opacity: 0; transition: opacity .15s var(--ease); }
.xl tbody tr:hover .xl-act .icon-btns, .xl tbody tr:focus-within .xl-act .icon-btns { opacity: 1; }
@media (hover: none) { .xl-act .icon-btns { opacity: 1; } }
.share-btns { display: flex; gap: 4px; }
.btn-xs { height: 28px; padding: 0 9px; gap: 5px; font-size: 12px; border-radius: 7px; }
.btn-xs .ic { width: 13px; height: 13px; }
.btn-mail { color: var(--primary-2); border-color: var(--primary-edge); background: var(--primary-face); }
.xl-muted { font-size: 12.5px; color: var(--muted); }
/* 자동 저장 상태 */
.xl-state { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 99px; font-size: 12.5px; font-weight: 500; color: var(--text-2); background: var(--inset); border: 1px solid var(--line); white-space: nowrap; }
.xl-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.xl-state i.ok { background: var(--green-t); box-shadow: 0 0 0 3px var(--green-face); }
.xl-state i.busy { background: var(--amber-t); box-shadow: 0 0 0 3px var(--amber-face); animation: blink 1s ease-in-out infinite; }
.xl-state i.bad { background: var(--red-t); box-shadow: 0 0 0 3px var(--red-face); }
@keyframes blink { 50% { opacity: .35; } }
.xl-keys { margin-left: auto; }
@media (max-width: 760px) {
  .xl-keys { display: none; }
  .xl .xl-in { height: 46px; font-size: 16px; }
  .xl tbody td { height: 46px; }
}

/* ── 19. 위원 안내 메일 (발송 상태·메일 버튼·작성 모달) ─────── */
.mail-pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-2); background: rgba(148, 163, 184, .12); border: 1px solid var(--line-2); }
.mail-pill .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.mail-pill.ok { color: var(--green-t); background: var(--green-face); border-color: var(--green-edge); }
.mail-pill.warn { color: var(--amber-t); background: var(--amber-face); border-color: var(--amber-edge); }
.btn-mailto { height: 30px; padding: 0 11px; border-radius: 8px; }
.code-btn { cursor: pointer; font: inherit; font-family: var(--mono); transition: background-color .15s, border-color .15s; }
.xl td.c-code .code-btn { font-size: 12.5px; font-weight: 700; padding: 3px 8px; }
.code-btn:hover { background: rgba(14, 165, 233, .2); border-color: var(--primary-2); }
.btn-count { min-width: 20px; height: 20px; margin-left: 2px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px; font-size: 11.5px; font-weight: 800; background: rgba(255, 255, 255, .22); }
.modal-head .small { margin-top: 2px; }
.mail-form { gap: 16px 18px; }
.mail-form textarea { min-height: 300px; font-size: 14px; line-height: 1.7; }
.field > span small { margin-left: 4px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.field .req, .xl .req { margin-left: 2px; color: var(--red-t); font-weight: 700; }
.field > span .req { margin-left: -3px; }
.mail-note { display: flex; gap: 8px; margin-top: 14px; padding: 11px 13px; border-radius: 10px; font-size: 12.5px; line-height: 1.6; color: var(--text-2); background: var(--inset); border: 1px solid var(--line); }
.mail-note .ic { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--primary-2); }
.acts-split .grow { flex: 1; }
@media (max-width: 640px) {
  .acts-split .grow { display: none; }
  .mail-form textarea { min-height: 260px; }
}

/* 위원 시트: 화면이 좁아 가로로 밀려도 발송·메일·삭제 열은 오른쪽에 고정 */
.xl-ev .c-sent, .xl-ev .c-mail, .xl-ev .xl-act { position: sticky; z-index: 1; background: var(--inset); }
.xl-ev thead .c-sent, .xl-ev thead .c-mail, .xl-ev thead .xl-act { z-index: 2; background: var(--card-2); }
.xl-ev .xl-act { right: 0; }
.xl-ev .c-mail { right: 52px; }
.xl-ev .c-sent { right: 176px; box-shadow: -10px 0 12px -10px rgba(0, 0, 0, .7); border-left: 1px solid var(--line-2); }
.xl-ev tbody tr:hover .c-sent, .xl-ev tbody tr:hover .c-mail, .xl-ev tbody tr:hover .xl-act { background: linear-gradient(rgba(148, 163, 184, .035), rgba(148, 163, 184, .035)), var(--inset); }
@media (max-width: 760px) { .xl-ev .c-sent, .xl-ev .c-mail, .xl-ev .xl-act { position: static; box-shadow: none; } }
.btn-mailbulk { height: 40px; padding: 0 18px; font-size: 15px; font-weight: 700; }
.btn-mailbulk .ic { width: 17px; height: 17px; }
.btn-mailbulk .btn-count { height: 22px; min-width: 22px; font-size: 12.5px; }
.field > span .auto-tag { margin-left: 6px; padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 700; color: var(--green-t); background: var(--green-face); border: 1px solid var(--green-edge); }
/* 시트 역할 칸: 목록에서 고르는 칸임을 화살표로 알린다 */
.xl .c-role .xl-in { cursor: pointer; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f7f96' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
.xl .c-role .xl-in:focus { caret-color: transparent; }

/* ── 20. 평가 입장 주소 (평가코드) ───────────────────────── */
.gate-card { display: flex; align-items: center; gap: 12px; margin: -6px 0 18px; padding: 14px; border-radius: 12px; background: var(--primary-face); border: 1px solid var(--primary-edge); }
.gate-card .tile { flex: none; }
.gate-card div { min-width: 0; line-height: 1.35; }
.gate-card small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--primary-2); }
.gate-card b { display: block; margin-top: 2px; font-size: 15px; }
.gate-card div > span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.gate-miss { margin: -6px 0 18px; }
.gate-row { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--inset); border: 1px solid var(--line-2); }
.gr-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gr-item.grow { flex: 1; }
.gr-item small { font-size: 12px; font-weight: 600; color: var(--muted); }
.gr-item .code { align-self: flex-start; font-size: 14px; }
.gr-link { font-size: 14.5px; font-weight: 600; color: var(--primary-2); text-decoration: none; word-break: break-all; }
.gr-link:hover { text-decoration: underline; }
.gate-help { display: flex; gap: 8px; margin-top: 10px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.gate-help .ic { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--primary-2); }
.gate-help b { color: var(--text-2); font-weight: 600; word-break: break-all; }
/* 메일 본문 편집 영역: 받는 쪽에서 보이는 모습 그대로(흰 종이) 보여 주고 바로 고친다 */
.mail-rich {
  min-height: 300px; max-height: 46vh; overflow: auto; padding: 22px 22px 10px;
  font-family: "Malgun Gothic", var(--font); font-size: 14px; line-height: 1.7; color: var(--paper-ink);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 10px; outline: none;
}
.mail-rich:focus { box-shadow: var(--ring); border-color: var(--primary); }
.mail-rich a { word-break: break-all; }
.field.mail-body-field { padding-top: 0; }
.field.mail-body-field > span { position: static; transform: none; padding: 0 2px; background: none; }
.mail-note b { color: var(--text); }

/* 보조 설명 문장: PC 에서는 한 줄(넘치면 말줄임), 휴대폰에서는 빈 화면 설명은 숨기고 나머지는 한 줄로 줄인다 */
.empty p { max-width: 100%; }
.empty p, .ph-text p, .xl-title p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xl-title p { min-width: 0; max-width: 100%; }
@media (max-width: 640px) { .empty p { display: none; } }

/* ── 21. 초기 화면 왼쪽: 큰 제목 + 부제 + 입장 카드를 가리키는 화살표 ── */
/* 로고판: 높이 127px 고정. 로고 글자(잉크) 기준 좌우 여백이 54px 로 같다.
   원본 PNG 왼쪽에 13px 투명 여백이 있어 왼쪽 안쪽 여백을 그만큼 덜 준다 */
.logo-plate { display: flex; align-items: center; justify-content: center; width: var(--intro-w); height: 127px; box-sizing: border-box; margin-bottom: 40px; padding: 0 54px 0 47px; border-radius: 14px; background: var(--paper); box-shadow: 0 12px 32px -14px rgba(0, 0, 0, .7); }
.logo-plate img { display: block; width: 100%; height: auto; }
/* 왼쪽 묶음 폭 = 부제 한 줄 길이(약 420px). 제목 둘째 줄과 로고판도 같은 폭으로 맞춘다 */
.auth-intro { --intro-w: 420px; }
.auth-intro h1 { font-size: 71px; line-height: 1.12; font-weight: 800; letter-spacing: -0.05em; }
.auth-intro .lead { margin-top: 22px; font-size: 27px; font-weight: 500; letter-spacing: -0.02em; color: var(--text-2); white-space: nowrap; }
/* 화살표도 부제 길이(--intro-w)와 같게. 왼쪽 칸 = 420 + 40px 이라 화살표 끝과 입장 카드 사이가 120px(40 + 칸 간격 80) */
.auth-arrow { position: relative; display: flex; align-items: center; width: var(--intro-w); height: 64px; margin-top: 56px; }
.auth-arrow svg { flex: 1; width: 0; min-width: 0; height: 64px; overflow: visible; }
.arw-rail { stroke: var(--line-2); stroke-width: 2; }
.arw-flow { stroke: url(#arw-g); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 150 400; animation: arw-flow 2.2s cubic-bezier(.45, 0, .2, 1) infinite; }
.arw-head { flex: none; width: 64px; height: 64px; margin-left: -6px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--grad-primary); box-shadow: var(--sh-primary), 0 0 0 8px rgba(14, 165, 233, .12); animation: arw-nudge 2.2s cubic-bezier(.45, 0, .2, 1) infinite; }
.arw-head .ic { width: 28px; height: 28px; stroke-width: 2.4; }
@keyframes arw-flow { from { stroke-dashoffset: 150; } to { stroke-dashoffset: -400; } }
@keyframes arw-nudge { 0%, 55% { transform: translateX(0); } 75% { transform: translateX(10px); } 100% { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .arw-flow, .arw-head { animation: none; } .arw-flow { stroke-dasharray: none; } }
@media (max-width: 960px) {
  /* 휴대폰도 부제 길이(약 248px)에 제목·로고를 맞춘다 */
  .logo-plate { width: 248px; height: 76px; margin-bottom: 22px; padding: 0 34px 0 30px; }
  .auth-intro h1 { font-size: 42px; }
  .auth-intro .lead { margin-top: 10px; font-size: 16px; }
  .auth-arrow { display: none; }
}

/* 입장 카드: 두 역할 패널을 같은 칸에 겹쳐 두고 보이지 않는 쪽은 숨긴다. 역할을 바꿔도 카드 높이가 그대로다 */
.role-panels { display: grid; }
.role-panels > .role-panel { grid-area: 1 / 1; gap: 10px; transition: opacity .2s var(--ease); }
.auth-card:has(#role-admin:checked) .panel-ev, .auth-card:not(:has(#role-admin:checked)) .panel-admin { display: flex; visibility: hidden; opacity: 0; pointer-events: none; }
.pin-input { height: 68px; font-size: 22px; letter-spacing: .3em; }
.field:has(.pin-input) { --fl-h: 68px; }
.role-panels .hint-line { margin-top: 6px; }
/* 제목 첫 줄(창업지원사업)은 둘째 줄의 절반 크기 */
.auth-intro h1 small { display: block; margin-bottom: .14em; font-size: .5em; line-height: 1.2; letter-spacing: -0.035em; color: var(--text-2); }
/* 왼쪽 묶음 높이 = 입장 카드 높이. 로고 윗변은 카드 윗변, 화살표 아랫변은 카드 아랫변에 맞춘다 */
@media (min-width: 961px) {
  .auth { align-items: center; align-content: center; }

  .auth-intro { align-self: stretch; }
  .auth-intro { display: flex; flex-direction: column; align-items: flex-start; }
  .auth-arrow { margin-top: auto; }
}
/* 하단 문구는 흐름에서 빼서 로그인 묶음이 브라우저 세로 가운데에 오게 한다(화면 높이가 넉넉할 때만) */
@media (min-width: 961px) and (min-height: 760px) { .auth-foot { position: absolute; left: 0; right: 0; bottom: 0; } }
/* 입장 카드 머리: 로고 아이콘과 제목을 세로 가운데로 맞춘다 */
.auth-head { align-items: center; }
.auth-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
@media (max-width: 640px) { .auth-head h2 { font-size: 22px; } }
.si-txt small i { margin-left: 6px; font-size: 12px; font-style: normal; font-weight: 500; color: var(--muted); }
/* 평가 목록 항목 끝 화살표 */
.si-go { flex: none; display: grid; place-items: center; color: var(--muted); transition: transform .18s var(--ease), color .18s var(--ease); }
.si-go .ic { width: 16px; height: 16px; }
.side-item:hover .si-go { color: var(--text-2); transform: translateX(2px); }
.side-item.on .si-go { color: var(--primary-2); }
.side-item.on .si-ic { border-color: transparent; box-shadow: var(--sh-primary); }
/* 휴대폰 초기 화면: 위쪽 로고판을 빼고 제목·부제 → 입장 카드 → 맨 아래 센터 로고만 둔다. 하단 문구는 숨긴다 */
@media (max-width: 960px) {
  .auth { row-gap: 0; align-content: start; }
  .auth-intro { display: contents; }
  .auth-card { margin-top: 24px; }
  .auth-intro .logo-plate { order: 1; justify-self: center; margin: 32px 0 0; }
  .auth-foot { display: none; }
}
/* 휴대폰: 바탕(#060b14)과 카드(#0f1a2e)의 밝기 차이가 거의 없어 입장 카드가 묻힌다.
   카드를 한 단계 밝은 면으로 올리고 테두리·외곽선을 또렷하게 한다. 플로팅 라벨 배경도 같은 면 색으로 맞춘다 */
@media (max-width: 960px) {
  .auth-card { --fl-bg: var(--card-2); background: var(--card-2); border: 1.5px solid rgba(56, 189, 248, .5); box-shadow: 0 0 0 4px rgba(14, 165, 233, .08), 0 24px 48px -16px rgba(0, 0, 0, .8); }
  .auth-card .role-box { background: var(--card); }
}
/* 휴대폰: 제목은 가운데 정렬, 부제는 숨긴다 */
@media (max-width: 960px) {
  .auth-intro h1 { text-align: center; }
  .auth-intro .lead { display: none; }
}
/* 휴대폰에서 줄이는 문구 조각 */
.hide-m { font-style: normal; }
@media (max-width: 960px) { .hide-m { display: none; } }

/* 점수 선택: 1~10 열 칸. 배점이 10점이 아니면 칸 아래에 실제 반영 점수(배점 × n/10)를 작게 보여 준다 */
.grades { display: inline-grid; grid-template-columns: repeat(10, 36px); }
.grades button { min-width: 0; min-height: 44px; padding: 4px 0; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.grades button small { margin-top: 0; font-size: 10.5px; }
@media (max-width: 960px) {
  .grades { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); flex: 1 1 100%; }
  .grades button { min-height: 46px; font-size: 16px; }
}
/* 위원 화면 머리(평가명·단계) 내용 폭을 상단바·본문·하단 제출바와 같게 맞춘다 */
.ev-hero .in { max-width: calc(1200px - var(--gutter) * 2); }
/* 휴대폰 기업 띠: 끌어서 멈출 때도 첫 칸이 본문 왼쪽 끝(16px)에 맞게 */
@media (max-width: 960px) { .co-list { scroll-padding-inline: var(--gutter); } }

/* ── 22. 평가의견 도구: 펜으로 쓰기 · 마이크로 말하기 (아이콘 버튼) ── */
.comment-box { position: relative; }
.comment-box .comment-field textarea { padding-bottom: 54px; }
.comment-box .comment-field textarea { min-height: 120px; }
/* 도구 버튼은 입력칸 오른쪽 아래 모서리 안쪽에 놓는다 */
.comment-box .comment-field { position: relative; }
.comment-tools { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.tool-btn {
  width: 40px; height: 40px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text-2);
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.tool-btn .ic { width: 19px; height: 19px; }
.tool-btn:hover:not(:disabled) { color: var(--primary-2); border-color: var(--primary-edge); background: var(--primary-face); }
.tool-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.tool-btn:disabled { opacity: .4; cursor: not-allowed; }
.tool-btn.sm { width: 32px; height: 32px; }
.tool-btn.sm .ic { width: 16px; height: 16px; }
/* 녹음 중: 빨간 버튼 + 퍼지는 고리 */
.tool-btn.rec { color: #fff; background: var(--red); border-color: transparent; animation: mic-pulse 1.4s ease-out infinite; }
@keyframes mic-pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); } 100% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); } }
/* 저장된 손글씨 의견 */
.ink-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; padding: 12px 12px 12px 16px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line-2); }
.ink-note img { flex: 1; min-width: 0; max-height: 140px; object-fit: contain; object-position: left center; }
.ink-note .tool-btn { background: #eef2f7; border-color: var(--paper-line); color: var(--paper-muted); }
/* 손글씨 입력 패드 (흰 종이) */
.ink-paper { position: relative; border-radius: 12px; background: var(--paper); border: 1px solid var(--line-2); overflow: hidden;
  background-image: repeating-linear-gradient(transparent 0 39px, var(--paper-line) 39px 40px); }
.ink-paper canvas { display: block; width: 100%; touch-action: none; cursor: crosshair; }
.ink-hint { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-size: 14px; color: var(--paper-muted); }
.ink-paper.used .ink-hint { display: none; }

/* ── 23. 서명 등록: 입력란과 미리보기를 같은 위치·같은 크기로 ── */
.sig-area { --sig-h: 240px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* 두 칸의 머리줄(탭 / '미리보기')을 같은 높이로 맞춰 아래 상자 윗변이 나란해지게 한다 */
.sig-area .seg { height: 46px; box-sizing: border-box; margin-bottom: 12px; }
.sig-preview .sp-label { height: 46px; display: flex; align-items: flex-end; margin-bottom: 12px; padding-bottom: 6px; box-sizing: border-box; }
.padbox canvas { height: var(--sig-h); }
.sig-area .drop { min-height: var(--sig-h); box-sizing: border-box; }
.sig-paper { height: var(--sig-h); box-sizing: border-box; display: grid; grid-template-rows: 1fr auto; border-radius: 14px; }
.sig-paper .ph { height: auto; min-height: 0; }
.sig-paper img { max-height: calc(var(--sig-h) - 90px); }
/* 저장 버튼 앞 안내 */
.sig-save-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.sig-notice { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; font-size: 14px; color: var(--amber-t); background: var(--amber-face); border: 1px solid var(--amber-edge); }
.sig-notice .ic { width: 18px; height: 18px; flex: none; }
.sig-notice b { font-weight: 700; }
@media (max-width: 760px) {
  .sig-area { --sig-h: 200px; grid-template-columns: 1fr; }
  .sig-preview .sp-label { height: auto; margin-bottom: 8px; }
  .sig-save-row { width: 100%; }
  .sig-notice { width: 100%; justify-content: center; }
  .sig-save-row .btn { width: 100%; }
}
/* 서명 등록 제목: 설명 문장 없이 크게, 아이콘과 세로 가운데 */
.sign-panel .panel-head { align-items: center; }
.sign-panel .ph-text h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.sign-panel .panel-head .tile { width: 44px; height: 44px; }
@media (max-width: 640px) { .sign-panel .ph-text h2 { font-size: 20px; } }

/* ── 24. 점수 선택기: ‹ 정수 점수(높은 쪽 절반) › + 소수 첫째 자리 줄 ── */
.crit-pick { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.picker { display: inline-flex; align-items: stretch; gap: 4px; padding: 4px; border-radius: 12px; background: var(--inset); border: 1px solid var(--line); }
.pk-nums { display: flex; gap: 4px; }
.pk-n, .pk-nav {
  height: 52px; border: 0; border-radius: 9px; background: none; cursor: pointer; font: inherit;
  transition: background-color .15s var(--ease), color .15s var(--ease), opacity .15s var(--ease);
}
.pk-n { min-width: 44px; padding: 0 6px; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
.pk-n:hover { background: var(--card-2); color: var(--text); }
.pk-n.on { color: #fff; background: var(--grad-primary); box-shadow: var(--sh-primary); }
.pk-nav { width: 34px; display: grid; place-items: center; color: var(--primary-2); background: var(--card); }
.pk-nav .ic { width: 18px; height: 18px; stroke-width: 2.4; }
.pk-nav:hover:not(:disabled) { background: var(--primary-face); }
.pk-nav:disabled { opacity: .25; cursor: default; color: var(--muted); background: none; }
.pk-dec { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; padding: 4px; border-radius: 10px; background: var(--primary-face); border: 1px solid var(--primary-edge); animation: sug-in .16s var(--ease); }
.pk-dec button { height: 36px; min-width: 40px; border: 0; border-radius: 7px; background: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); }
.pk-dec button:hover { background: var(--card-2); color: var(--text); }
.pk-dec button.on { color: #fff; background: var(--primary); }
@media (max-width: 960px) {
  .crit-pick { flex: 1 1 100%; align-items: stretch; }
  .picker { display: flex; }
  .pk-nums { flex: 1; }
  .pk-n { flex: 1; min-width: 0; padding: 0; height: 54px; font-size: 18px; }
  .pk-nav { width: 38px; height: 54px; }
  .pk-dec { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pk-dec button { min-width: 0; height: 42px; font-size: 14px; }
}
@media (max-width: 420px) { .pk-nums { gap: 2px; } .pk-n { font-size: 16px; letter-spacing: -0.02em; } .pk-nav { width: 32px; } }

/* ── 25. AI로 다듬기 ── */
.tool-ai { color: var(--violet-t); border-color: var(--violet-edge); background: var(--violet-face); }
.tool-ai:hover:not(:disabled) { color: #fff; background: var(--violet); border-color: transparent; }
.ai-wait { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 48px 0; color: var(--text-2); font-size: 14.5px; }
.ai-wait .spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--violet-face); border-top-color: var(--violet-t); animation: ai-spin .8s linear infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-opts { display: grid; gap: 10px; margin-top: 6px; }
.ai-opt { position: relative; cursor: pointer; }
.ai-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ai-box { display: block; padding: 14px 16px; border-radius: 12px; background: var(--inset); border: 1px solid var(--line-2); transition: border-color .15s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease); }
.ai-box b { display: inline-block; margin-bottom: 6px; padding: 2px 8px; border-radius: 99px; font-size: 12px; color: var(--violet-t); background: var(--violet-face); }
.ai-box span { display: block; font-size: 14.5px; line-height: 1.7; color: var(--text); }
.ai-opt:hover .ai-box { border-color: var(--line-3); }
.ai-opt input:checked + .ai-box { border-color: var(--violet-t); background: var(--violet-face); box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }
.ai-opt input:focus-visible + .ai-box { outline: 2px solid var(--violet-t); outline-offset: 2px; }
.ai-orig { margin-top: 12px; font-size: 13px; color: var(--muted); }
.ai-orig summary { cursor: pointer; }
.ai-orig p { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--inset); color: var(--text-2); line-height: 1.6; }
.modal .acts .grow { flex: 1; }
@media (max-width: 640px) { .modal .acts .grow { display: none; } }
/* 소수 줄(.0~.9)은 위 점수 상자(‹ … ›)와 같은 폭 */
.crit-pick { display: inline-flex; align-items: stretch; }
.pk-dec { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.pk-dec button { min-width: 0; padding: 0; font-size: 13.5px; }
@media (max-width: 960px) { .crit-pick { display: flex; } .pk-dec { grid-template-columns: repeat(10, minmax(0, 1fr)); } .pk-dec button { height: 40px; font-size: 14px; } }
/* 점수 칸은 한 자리·두 자리 숫자 모두 같은 폭 → 1~5, 6~10, 11~15 어느 쪽이어도 상자 크기가 같다 */
@media (min-width: 961px) { .pk-n { width: 50px; min-width: 50px; padding: 0; flex: none; } }
/* 점수 직접 입력칸: '14.8' 같은 소수 점수가 다 보이게 넓히고, 숫자 증감 화살표는 숨긴다(높이는 점수 상자와 같게) */
.score-in input { width: 96px; height: 62px; padding: 0 10px; text-align: center; font-size: 19px; -moz-appearance: textfield; appearance: textfield; }
.score-in input::-webkit-outer-spin-button, .score-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
@media (max-width: 960px) { .score-in input { height: 64px; } }
/* 점수 상자·소수 줄 높이를 줄이고, 점수 상자와 직접 입력칸의 윗변·높이(50px)를 맞춘다 */
.crit-in { align-items: flex-start; }
.pk-n, .pk-nav { height: 40px; }
.pk-n { font-size: 16px; }
.pk-dec { padding: 3px; }
.pk-dec button { height: 28px; font-size: 13px; }
.score-in { height: 50px; }
.score-in input { height: 50px; font-size: 18px; }
@media (max-width: 960px) {
  .pk-n, .pk-nav { height: 44px; }
  .pk-dec button { height: 34px; }
  .score-in, .score-in input { height: 54px; }
}
/* AI 버튼 왼쪽 안내 말풍선(5초) */
.comment-tools { align-items: center; }
.ai-hint {
  position: absolute; right: calc(100% + 10px); top: 50%; transform: translate(6px, -50%); white-space: nowrap;
  padding: 9px 13px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text);
  background: var(--card-2); border: 1px solid var(--violet-edge); box-shadow: var(--sh-pop);
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.ai-hint::after { content: ""; position: absolute; right: -6px; top: 50%; width: 10px; height: 10px; margin-top: -5px; transform: rotate(45deg); background: var(--card-2); border-top: 1px solid var(--violet-edge); border-right: 1px solid var(--violet-edge); }
.ai-hint.show { opacity: 1; transform: translate(0, -50%); }
@media (max-width: 640px) { .ai-hint { white-space: normal; width: max-content; max-width: calc(100vw - 180px); } }
/* 하단 제출바: 서명·서명 변경을 맨 앞에 고정하고, 자동 저장 메시지는 가운데 칸에서 가운데 정렬
   (메시지 길이가 바뀌어도 서명 위치가 흔들리지 않게) */
.submitbar .in { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.submitbar .savestate { justify-self: stretch; justify-content: center; text-align: center; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.submitbar #btn-review { margin-left: 0; }
@media (max-width: 960px) {
  .submitbar .in { grid-template-columns: auto auto minmax(0, 1fr); gap: 8px 10px; }
  .submitbar #btn-review { grid-column: 1 / -1; width: 100%; }
}
/* 총점: 육각 테두리와 여유가 있게 글자를 조금 줄인다 */
.total b { font-size: 27px; }
.total span { font-size: 11.5px; }
@media (max-width: 960px) { .total b { font-size: 20px; } .total span { font-size: 11px; } }
/* 위원 화면 상단: 이름 한 줄 + 로그아웃 글자 버튼 */
.user-chip { padding-right: 16px; }
.btn-logout { gap: 6px; }
.btn-logout .ic { width: 16px; height: 16px; }
@media (max-width: 640px) { .user-chip > div { display: none; } .user-chip { padding-right: 3px; } }
/* 브랜드: "선정평가 시스템" 끝을 아래 "경남창조경제혁신센터" 끝과 맞춘다(글자 폭 실측 기준) */
.tb-title b { font-size: 16.35px; white-space: nowrap; }
/* 펜으로 쓰기 도구줄: 펜 / 지우개 + 한 획 되돌리기 */
.ink-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ink-tools .seg { margin-bottom: 0; }
.ink-paper.erasing canvas { cursor: cell; }
@media (max-width: 640px) { .ink-tools .seg { flex: 1; } }
.ink-hist { display: flex; gap: 6px; }
.ic-flip .ic { transform: scaleX(-1); }
/* AI로 글자 변환 */
.btn-ai { color: var(--violet-t); border-color: var(--violet-edge); background: var(--violet-face); }
.btn-ai:hover:not(:disabled) { color: #fff; background: var(--violet); border-color: transparent; }
.btn-ai.busy .ic { animation: ai-spin 1s linear infinite; }
.ocr-out { margin-top: 14px; }
.ocr-out[hidden] { display: none; }
.ocr-out textarea { min-height: 96px; }
.ocr-acts { display: flex; justify-content: flex-end; margin-top: 8px; }
.modal .acts .btn[hidden] { display: none; }
/* 글자 변환 뒤에는 두 넣기 버튼이 한 줄에 나란히 */
.modal .acts .btn { white-space: nowrap; }
/* 휴대폰 저장 표시: 긴 문장 대신 짧은 표시만. 저장됨은 2.4초 동안 보였다가 사라진다 */
@media (max-width: 960px) {
  .submitbar .savestate { font-size: 0; gap: 6px; }
  .submitbar .savestate::after { content: attr(data-short); font-size: 12.5px; font-weight: 600; }
  .submitbar .savestate:not(.err):not(.flash)[data-short="저장됨"], .submitbar .savestate[data-short=""] { opacity: 0; }
  .submitbar .savestate.flash { animation: save-flash 2.4s ease forwards; }
}
@keyframes save-flash { 0% { opacity: 0; } 12% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
.doc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.doc-btns .btn { white-space: nowrap; padding: 0 10px; }
.spin.sm { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: currentColor; animation: ai-spin .8s linear infinite; }
@media (max-width: 640px) { .doc-btns { grid-template-columns: 1fr; } }

/* ── 26. 담당자 대시보드 ── */
.brand-home { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 12px; }
.brand-home:hover .tb-title b { color: var(--primary-2); }
.brand-home:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 4px; }
.brand-home .tb-title b, .brand-home .tb-title small { display: block; }
.dash { display: flex; flex-direction: column; gap: 24px; }
.dash-flow { max-width: none; margin-top: 0; }
.dash-flow li { flex-direction: row; justify-content: flex-start; align-items: center; gap: 14px; padding: 18px 18px 18px 20px; text-align: left; }
.dash-flow li::before { top: 8px; left: auto; right: 12px; }
.dash-flow li b { margin-top: 0; font-size: 15px; }
.dash-flow li small { display: block; margin-top: 2px; }
.dash-flow li > b, .dash-flow li > small { grid-column: 2; }
.dash-flow li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 0; }
.dash-flow li .tile { grid-row: 1 / 3; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dash-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.dash-head p { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 0; }
.dash-tbl td { vertical-align: middle; }
.dash-tbl td small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.dash-row { cursor: pointer; }
.dash-row:hover td { background: rgba(14, 165, 233, .05) !important; }
.dash-row:hover .dash-go { color: var(--primary-2); transform: translateX(2px); }
.dash-go { display: inline-grid; place-items: center; color: var(--muted); transition: transform .15s var(--ease), color .15s var(--ease); }
.dash-go .ic { width: 16px; height: 16px; }
.dash-prog { display: flex; flex-direction: column; gap: 6px; }
.dash-prog .bar { height: 6px; border-radius: 3px; background: var(--inset); overflow: hidden; }
.dash-prog .bar i { display: block; height: 100%; border-radius: 3px; background: var(--grad-primary); }
.dash-prog span { font-size: 12.5px; color: var(--text-2); }
@media (max-width: 1560px) { .kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-flow li { padding: 14px; }
  .dash-head .toolbar { width: 100%; }
  .dash-head .toolbar .btn { flex: 1; }
  .dash-tbl thead { display: none; }
  .dash-tbl, .dash-tbl tbody, .dash-tbl tr, .dash-tbl td { display: block; width: auto !important; }
  .dash-tbl tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 14px; border-bottom: 1px solid var(--line); }
  .dash-tbl td { padding: 0; border: 0; text-align: left !important; }
  .dash-tbl td:nth-child(1) { grid-column: 1; font-size: 12.5px; color: var(--muted); }
  .dash-tbl td:nth-child(6) { grid-column: 2; grid-row: 1; justify-self: end; }
  .dash-tbl td:nth-child(2) { grid-column: 1 / -1; }
  .dash-tbl td:nth-child(3), .dash-tbl td:nth-child(4), .dash-tbl td:nth-child(7) { display: none; }
  .dash-tbl td:nth-child(5) { grid-column: 1 / -1; }
}
/* 대시보드: 집계가 끝난 평가의 결과 리포트 바로가기 */
.btn-report { color: var(--green-t); border-color: var(--green-edge); background: var(--green-face); white-space: nowrap; }
.btn-report:hover { color: #fff; background: var(--green); border-color: transparent; }
@media (max-width: 760px) {
  .dash-tbl td.dash-act { display: block !important; grid-column: 1 / -1; }
  .dash-tbl td.dash-act .dash-go { display: none; }
  .dash-tbl td.dash-act .btn-report { width: 100%; }
}
.dash-tbl td:first-child { white-space: nowrap; }
