/*
 * bankunfreeze 화면 스타일 (의뢰인 화면 + 어드민 공용)
 *
 * 디자인 원칙
 *   얼어 있는 통장이 점수만큼 녹는다. 계산 중에는 얼음빛 배경, 결과는 등급에 따라 노랑·주황빛으로 바뀐다.
 *   흰 카드와 가는 선, 그림자는 거의 쓰지 않는다. 밝은 한 가지 테마.
 *
 * 화면 상태는 <body> 의 속성으로 바꾼다 (assets/js/app.js · admin.js 의 render 가 넣는다)
 *   data-view = calc | result | apply | admin   화면 종류(폭·여백이 달라진다)
 *   data-tone = ice | cool | sun | amber | warm | over | plain   배경 색조(등급에 따라)
 *
 * 색·글꼴·둥글기는 맨 위 :root 의 변수만 고치면 전체에 반영된다. 키 컬러는 --key.
 *
 * 목차
 *   기본값(변수, 리셋)
 *   0. 머리글 · 바닥글
 *   1. 계산기와 결과: 왼쪽은 얼음 통장과 점수, 오른쪽은 문항 카드
 *      얼어 있는 통장 그림
 *   2. 결과 카드와 수임 신청 버튼
 *   3. 수임 신청(4단계)
 *   4. 어드민
 *      대화상자 · 알림
 *   5. 설치 버전에서 추가된 부분(주소 검색창, 어드민 로그인·저장 막대·라이브 준비 상태 등)
 *
 * 글꼴은 Google Fonts(Hanken Grotesk, Noto Sans KR)를 HTML 의 <link> 로 불러온다.
 * 외부 접속 없이 쓰려면 글꼴 파일을 assets 에 두고 @font-face 로 바꾸면 된다(src/app.js 의 CSP 도 함께 수정).
 */

:root {
  color-scheme: light;
  --bg: #e4effa;
  --card: #ffffff;
  --ink: #10233f;
  --soft: #44546a;
  --faint: #64748b;
  --rule: #e3e8ef;
  --rule2: #c3cdda;
  --line: rgba(16, 35, 63, 0.1);
  --key: #1d4f9e;
  --key-deep: #163e7e;
  --on-key: #ffffff;
  --tint: #edf3fb;
  --ice: #dcebf8;
  --ice-ink: #2c5f91;
  --warn: #8a5300;
  --warn-bg: #fff3d6;
  --bad: #c2283c;
  --brand: #001944;
  --dark: #0f1f35;
  --dark-ink: #e7eef8;
  --dark-dim: #a3b4ca;
  --dark-on: #9cd0ff;
  --tone-ink: #1d4f9e;
  --x: #d8473b;
  --sans: 'Hanken Grotesk', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --r: 14px;
  --gut: clamp(18px, 4.5vw, 40px);
}
body[data-tone='cool'] {
  --bg: #eaf2fa;
}
body[data-tone='sun'] {
  --bg: #fff3c9;
  --tone-ink: #8a5a00;
}
body[data-tone='amber'] {
  --bg: #ffe7ba;
  --tone-ink: #9a4d00;
}
body[data-tone='warm'] {
  --bg: #ffdcc0;
  --tone-ink: #b03a00;
}
body[data-tone='over'] {
  --bg: #e9edf2;
  --tone-ink: #3e5068;
}
body[data-tone='plain'] {
  --bg: #f4f6f9;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  transition: background-color 1s ease;
}
h1,
h2,
h3 {
  text-wrap: balance;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: var(--key);
}
:focus-visible {
  outline: 2.5px solid var(--key);
  outline-offset: 2px;
}
.mono {
  font-variant-numeric: tabular-nums;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* 0. 머리글 · 바닥글 */
.top {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.top-in,
.wrap,
.foot-in {
  max-width: 1120px;
  margin: 0 auto;
}
body[data-view='admin'] .top-in,
body[data-view='admin'] .wrap {
  max-width: 1280px;
}
body[data-view='apply'] .wrap {
  max-width: 680px;
}
.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 0 var(--gut);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand svg {
  flex: none;
  width: auto;
  height: 25px;
  color: var(--brand);
}
.brand b {
  color: var(--key);
  font-weight: 700;
}
.top-r {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 13px;
  color: var(--soft);
}
.top-ctx {
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}
.wrap {
  padding: 0 var(--gut) 64px;
}
.foot {
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--soft);
}
.foot-in {
  padding: 18px var(--gut) 40px;
}
.foot p {
  margin: 0 0 4px;
}
.foot a {
  color: inherit;
}
body[data-view='admin'] .foot {
  display: none;
}
@media (max-width: 560px) {
  .top-firm {
    display: none;
  }
}

/* 1. 계산기와 결과: 왼쪽은 얼음 통장과 점수, 오른쪽은 문항 카드 */
.calc,
.res {
  display: grid;
  gap: 26px;
  padding-top: 28px;
}
.calc > *,
.res > * {
  min-width: 0;
}
.eyebrow {
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--soft);
}
.eyebrow i {
  margin: 0 7px;
  font-style: normal;
  opacity: 0.45;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(27px, 7vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.res .hero h1 {
  font-size: clamp(25px, 5.6vw, 36px);
}
.hero h1 em {
  font-style: normal;
  color: var(--tone-ink);
  transition: color 1s ease;
}
.lede {
  margin: 0;
  max-width: 31em;
  color: var(--soft);
  font-size: 16.5px;
}
.lede b {
  color: var(--ink);
  font-weight: 700;
}
.lede-p {
  display: block;
  margin: 2px 0 10px;
  text-wrap: balance;
  color: var(--ink);
  font-size: clamp(17px, 4.4vw, 20px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.025em;
}
.lede-p b {
  margin: 0 0 0 3px;
  padding: 0 1px 0 2px;
  color: var(--key);
  font-size: 1.5em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  background: linear-gradient(transparent 66%, #ffd75e 0);
}
.stage {
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 20px;
}
.stage > * {
  min-width: 0;
}
.res .stage {
  grid-template-columns: minmax(0, 52%) minmax(0, 1fr);
}
.lcd-k {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--soft);
}
.score {
  display: block;
  margin: 2px 0 6px;
  color: var(--ink);
  font-size: clamp(46px, 13vw, 76px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.score small {
  margin-left: 3px;
  font-size: 0.36em;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.score.word {
  font-size: clamp(32px, 9vw, 52px);
  letter-spacing: -0.035em;
}
.goal {
  margin: 0;
  font-size: 14.5px;
  color: var(--soft);
}
.goal b {
  color: var(--ink);
}
.pk {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}
.scale {
  margin-top: 20px;
}
.scale ol {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--soft);
}
.scale li {
  display: grid;
  justify-items: center;
  gap: 1px;
  opacity: 0.5;
}
.scale li.on {
  opacity: 1;
  color: var(--ink);
  font-weight: 700;
}
.scale.lock li {
  opacity: 0.85;
}
.scale li svg {
  width: 46px;
  height: 38px;
}
.scale-bar {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  height: 8px;
}
.scale-bar i {
  border-radius: 2px;
  background: #74a9df;
}
.scale-bar i:nth-child(2) {
  background: #a5caec;
}
.scale-bar i:nth-child(3) {
  background: #ffd24a;
}
.scale-bar i:nth-child(4) {
  background: #ffae3b;
}
.scale-bar i:nth-child(5) {
  background: #f47b20;
}
.scale-bar i:first-child {
  border-radius: 4px 2px 2px 4px;
}
.scale-bar i:nth-child(5) {
  border-radius: 2px 4px 4px 2px;
}
.scale-bar b {
  position: absolute;
  left: 40%;
  top: -5px;
  bottom: -5px;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--ink);
}
.scale-me {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3.5px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  outline: 1.5px solid var(--ink);
}
.anim .scale-me {
  animation: mein 0.5s ease-out 1.3s backwards;
}
.anim .scale li.on {
  animation: lion 0.5s ease-out 1.3s backwards;
}
@keyframes mein {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
}
@keyframes lion {
  from {
    opacity: 0.5;
    font-weight: 600;
  }
}
.scale-k {
  position: relative;
  height: 20px;
  margin: 7px 0 0;
  font-size: 12.5px;
  font-weight: 700;
}
.scale-k span {
  position: absolute;
  left: 40%;
  transform: translateX(-50%);
  white-space: nowrap;
}
.qbox {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.prog {
  height: 3px;
  background: var(--rule);
}
.prog i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--key);
  transition: width 0.25s ease-out;
}
.q {
  min-height: 150px;
  padding: 22px 22px 6px;
  animation: qin 0.2s ease-out;
}
@keyframes qin {
  from {
    opacity: 0.2;
    transform: translateX(8px);
  }
}
.q-cat {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--key);
}
.q-text {
  margin: 0;
  font-size: clamp(19px, 4.9vw, 22px);
  font-weight: 700;
  line-height: 1.45;
}
.q-hint {
  margin: 10px 0 0;
  color: var(--soft);
  font-size: 14.5px;
}
.keys {
  display: grid;
  grid-template-columns: 1fr 1fr 0.8fr;
  gap: 8px;
  padding: 14px 16px 6px;
}
.key {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 86px;
  border: 1.5px solid var(--rule2);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  transition:
    border-color 0.12s,
    background 0.12s,
    color 0.12s;
}
.key:hover {
  border-color: var(--ink);
}
.key:active {
  background: var(--tint);
}
.key svg {
  width: 30px;
  height: 30px;
}
.key .qm {
  font-size: 27px;
  font-weight: 700;
  line-height: 30px;
}
.key-o svg {
  color: var(--key);
}
.key-x svg {
  color: var(--x);
}
.key-m {
  color: var(--soft);
}
.key.sel {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.key.sel svg {
  color: #fff;
}
.key-eq {
  grid-column: 1/-1;
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 64px;
  border-color: var(--key);
  background: var(--key);
  color: var(--on-key);
  font-size: 17.5px;
  font-weight: 700;
}
.key-eq:hover {
  border-color: var(--key-deep);
  background: var(--key-deep);
}
.key-eq:active {
  background: var(--key-deep);
}
.key-eq svg {
  width: 20px;
  height: 20px;
  color: inherit;
}
.q-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px 6px;
  font-size: 13px;
  color: var(--faint);
}
.gate {
  display: grid;
  gap: 14px;
  padding: 8px 16px 4px;
}
.gate .field {
  margin: 0;
}
.gate .agree-all {
  padding: 12px 14px;
  font-size: 15.5px;
}
.gate .agree {
  margin: 2px 0 0;
}
.gate .agree li {
  padding: 1px 2px 1px 14px;
  font-size: 14.5px;
}
.gate > .msg {
  margin-top: -4px;
}
.hint.lim {
  flex-basis: 100%;
  margin: 6px 0 8px;
}
.link {
  min-height: 44px;
  padding: 10px 4px;
  border: 0;
  background: none;
  color: var(--soft);
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link:hover {
  color: var(--key);
}
.link:disabled {
  opacity: 0.35;
  text-decoration: none;
  cursor: default;
}
@media (pointer: coarse) {
  .kbd {
    display: none;
  }
}
@media (max-width: 1039px) {
  .calc,
  .res {
    max-width: 640px;
    margin: 0 auto;
  }
  .calc .scale ol {
    display: none;
  }
  .calc .scale {
    margin-top: 16px;
  }
}
@media (max-width: 599px) {
  .calc {
    gap: 20px;
    padding-top: 22px;
  }
  .calc .eyebrow,
  .calc .scale {
    display: none;
  }
  .calc .stage {
    margin-top: 14px;
  }
}
@media (min-width: 1040px) {
  .calc,
  .res {
    grid-template-columns: minmax(0, 1fr) minmax(0, 448px);
    gap: 56px;
    align-items: start;
    padding-top: 52px;
  }
  .hero h1 {
    font-size: clamp(30px, 3.7vw, 42px);
  }
  .res .hero h1 {
    font-size: clamp(28px, 3.1vw, 36px);
  }
  .side {
    position: sticky;
    top: 24px;
  }
  .stage,
  .res .stage {
    grid-template-columns: minmax(0, 58%) minmax(0, 1fr);
    gap: 26px;
    margin-top: 26px;
  }
  .scale {
    margin-top: 26px;
  }
  .q {
    padding: 26px 26px 8px;
  }
  .keys {
    padding: 16px 20px 8px;
  }
  .gate {
    padding: 8px 20px 4px;
  }
  .q-nav {
    padding: 0 22px 8px;
  }
}

/* 얼어 있는 통장 그림: --m(0~1)만큼 얼음이 위에서부터 녹는다. data-l은 등급 0~4, data-p는 계산 중 생기는 금 */
.tw {
  position: relative;
  aspect-ratio: 6/5;
  --m: 0;
  --tw-sun: #ffcb3d;
  -webkit-user-select: none;
  user-select: none;
}
.tw[data-l='3'] {
  --tw-sun: #ffb02e;
}
.tw[data-l='4'] {
  --tw-sun: #ff8f2e;
}
.tw svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.tw-sun {
  opacity: var(--m);
  transform: translateY(calc((1 - var(--m)) * 12%));
  transition:
    opacity 1.2s ease 0.3s,
    transform 1.8s ease;
}
.tw-sun circle {
  fill: var(--tw-sun);
  transition: fill 1.2s ease 0.4s;
}
.tw-puddle {
  transform-origin: 50% 88%;
  transform: scaleX(calc(0.35 + var(--m) * 0.65));
  opacity: calc(var(--m) * 4);
  transition:
    transform 1.9s ease,
    opacity 0.7s ease 0.2s;
}
.tw-book {
  transform-origin: 50% 60%;
  transform: translateY(calc(var(--m) * 5%)) rotate(calc(var(--m) * 3deg));
  transition: transform 1.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.tw-ice {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(14% + (1 - var(--m)) * 72%);
  overflow: hidden;
  clip-path: polygon(0 8px, 9% 3px, 20% 9px, 33% 2px, 46% 7px, 58% 1px, 70% 8px, 83% 3px, 100% 9px, 100% 100%, 0 100%);
  transform-origin: 50% 100%;
  transform: scaleX(calc(1 - var(--m) * 0.07));
  transition:
    height 1.9s cubic-bezier(0.4, 0, 0.2, 1),
    transform 1.9s ease;
}
.tw-ice svg {
  top: auto;
  bottom: 0;
  height: auto;
}
.tw-ice::before {
  content: '';
  position: absolute;
  left: 14%;
  right: 14%;
  top: 0;
  z-index: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.72);
  opacity: 0;
  transition: opacity 0.4s ease 0.3s;
}
.tw[data-l='1'] .tw-ice::before,
.tw[data-l='2'] .tw-ice::before,
.tw[data-l='3'] .tw-ice::before {
  opacity: 1;
}
.tw-crack path {
  opacity: 0;
  transition: opacity 0.35s ease;
}
.tw[data-p*='1'] .c1,
.tw[data-p*='2'] .c2,
.tw[data-p*='3'] .c3,
.tw[data-p*='4'] .c4 {
  opacity: 1;
}
.tw-frost {
  opacity: calc(1 - var(--m) * 3);
  transition: opacity 0.8s ease;
}
.tw-drip {
  opacity: 0;
  transition: opacity 0.5s ease 0.8s;
}
.tw[data-l='1'] .tw-drip,
.tw[data-l='2'] .tw-drip,
.tw[data-l='3'] .tw-drip {
  opacity: 1;
}
.tw-drip path {
  transform-box: fill-box;
  transform-origin: 50% 0;
  animation: drip 2.6s ease-in infinite;
}
.tw-drip path:nth-child(2) {
  animation-delay: 0.9s;
}
.tw-drip path:nth-child(3) {
  animation-delay: 1.7s;
}
@keyframes drip {
  0% {
    opacity: 0;
    transform: translateY(-12px) scale(0.5);
  }
  25% {
    opacity: 1;
    transform: translateY(-5px) scale(1);
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(12px) scale(0.9);
  }
}
.tw-free {
  opacity: 0;
  transition: opacity 0.6s ease 1.3s;
}
.tw[data-l='4'] .tw-free {
  opacity: 1;
}
.tw-tag {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 6px;
  background: var(--key);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
}
.tw-tag svg {
  position: static;
  width: 13px;
  height: 13px;
}
.tw.tap {
  animation: tap 0.24s ease-out;
}
@keyframes tap {
  40% {
    transform: scale(0.972) rotate(-0.7deg);
  }
}

/* 2. 결과 카드와 수임 신청 버튼 */
.slip {
  padding: clamp(20px, 4.8vw, 30px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.verdict {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.02em;
}
.note {
  margin: 0 0 16px;
  padding: 13px 16px;
  border-radius: 10px;
  background: var(--warn-bg);
  font-size: 14.5px;
}
.note b {
  display: block;
  margin-bottom: 2px;
  color: var(--warn);
}
.note.info {
  background: var(--tint);
}
.note.info b {
  color: var(--ice-ink);
}
.note .link {
  display: block;
  min-height: 36px;
  padding: 8px 0 0;
  color: var(--warn);
  font-weight: 600;
}
.proof {
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--rule);
}
.proof p {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--soft);
}
.proof b {
  margin: 0 2px 0 3px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  vertical-align: -2px;
}
.proof small {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--faint);
}
.go-l {
  display: grid;
  gap: 6px;
  margin: 14px 2px 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--soft);
}
.go-l li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 6px;
}
.go-l li::before {
  content: '';
  width: 4px;
  height: 4px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--faint);
}
.go-l b {
  color: var(--ink);
}
.link.cb {
  display: block;
  margin: 8px auto 0;
  color: var(--key);
  font-weight: 600;
}
.cb-done {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--key);
}
.fine {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--faint);
}
.tag {
  display: inline-block;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--rule);
  color: var(--soft);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0;
  white-space: nowrap;
  vertical-align: middle;
}
.tag.minus {
  background: #fbe5e8;
  color: var(--bad);
}
.tag.req {
  background: var(--tint);
  color: var(--key);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 22px;
  border: 1.5px solid var(--key);
  border-radius: 10px;
  background: var(--key);
  color: var(--on-key);
  font-size: 16.5px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn:hover {
  border-color: var(--key-deep);
  background: var(--key-deep);
}
.btn.block {
  width: 100%;
}
.btn.ghost {
  border-color: var(--rule2);
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
}
.btn.ghost:hover {
  border-color: var(--ink);
  background: var(--card);
}
.btn.sm {
  min-height: 38px;
  padding: 0 14px;
  border-width: 1px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.otp-r {
  display: flex;
  align-items: center;
  gap: 8px;
}
.otp-r .in {
  flex: 1;
  min-width: 0;
}
.otp-r .btn {
  flex: none;
  min-height: 50px;
  border-radius: 10px;
}
.otp-t {
  flex: none;
  min-width: 42px;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: var(--key);
  font-variant-numeric: tabular-nums;
}
.otp-t.end {
  color: var(--bad);
}
.vok {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--key);
}
.vok svg {
  width: 16px;
  height: 16px;
}
.in[readonly] {
  background: #f4f6f9;
  color: var(--soft);
}
.dlg-b.cbf {
  white-space: normal;
}
.cb-doc {
  font-size: 13.5px;
}
.cb-doc summary {
  display: flex;
  align-items: center;
  min-height: 36px;
  color: var(--soft);
  cursor: pointer;
}
.cb-doc div {
  max-height: 150px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f6f9;
  overflow: auto;
  font-size: 13px;
  white-space: pre-wrap;
}

/* 3. 수임 신청 */
.apply {
  padding-top: 28px;
}
.stepper ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.stepper li {
  padding-top: 10px;
  border-top: 2px solid var(--rule2);
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
}
.stepper li span {
  margin-right: 2px;
}
.stepper li.on {
  border-color: var(--ink);
  color: var(--ink);
}
.stepper li.done {
  border-color: var(--key);
  color: var(--key);
}
.apply-sum {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--soft);
}
.apply-sum svg {
  flex: none;
  width: 40px;
  height: 33px;
}
.apply-sum b {
  color: var(--ink);
}
.panel {
  margin: 0;
  padding: clamp(20px, 4.8vw, 32px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.panel h1 {
  margin: 0 0 6px;
  font-size: clamp(21px, 5vw, 26px);
  font-weight: 800;
}
.sub {
  margin: 0 0 22px;
  color: var(--soft);
  font-size: 15px;
}
.ck,
.rd {
  -webkit-appearance: none;
  appearance: none;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 1.5px solid var(--rule2);
  background: var(--card);
  cursor: pointer;
}
.ck {
  border-radius: 6px;
}
.rd {
  border-radius: 50%;
}
.ck:checked {
  border-color: var(--key);
  background: var(--key);
}
.ck:checked::after {
  content: '';
  width: 11px;
  height: 6px;
  border: solid var(--on-key);
  border-width: 0 0 2.5px 2.5px;
  transform: translateY(-1.5px) rotate(-45deg);
}
.rd:checked {
  border-color: var(--key);
}
.rd:checked::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--key);
}
.agree-all {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  background: #f4f6f9;
  font-size: 16.5px;
  font-weight: 700;
  cursor: pointer;
}
.agree-all small {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--faint);
}
.agree {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.agree li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 6px 8px 6px 16px;
  border-bottom: 1px solid var(--rule);
}
.agree label {
  padding: 8px 0;
  cursor: pointer;
}
.agree .must {
  color: var(--key);
  font-weight: 600;
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0 0 18px;
}
.field > label,
.q-l label,
.q-l .lb {
  font-size: 15px;
  font-weight: 600;
}
.in {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--rule2);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-size: 16px;
}
textarea.in {
  min-height: 120px;
  line-height: 1.6;
  resize: vertical;
}
.in::placeholder {
  color: var(--faint);
  opacity: 0.75;
}
.in:focus {
  border-color: var(--key);
  outline: 2.5px solid var(--key);
  outline-offset: 1px;
}
.field.err .in,
.field.err .opt,
.field.err .zone {
  border-color: var(--bad);
}
.hint {
  margin: 0;
  font-size: 13.5px;
  color: var(--faint);
}
.ac-wrap {
  position: relative;
}
body.ac-room main {
  padding-bottom: 75vh;
} /* 목록이 자판 뒤로 가려질 때 주소 칸을 화면 위로 올릴 여유 */
.ac {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  max-height: min(312px, 62vh);
  padding: 4px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--rule2);
  border-radius: 10px;
  box-shadow: 0 14px 30px -16px rgba(15, 31, 53, 0.4);
}
.ac [role='option'] {
  display: grid;
  gap: 1px;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  text-align: left;
  font-size: 15px;
}
.ac [role='option'] small {
  font-size: 12.5px;
  color: var(--faint);
}
.ac [role='option'] b {
  color: var(--key);
  font-weight: 700;
}
.ac [role='option']:hover,
.ac [role='option'].on {
  background: var(--tint);
}
.ac-l {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.ac p {
  flex: none;
  margin: 0;
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--faint);
}
.ac-h {
  border-bottom: 1px solid var(--rule);
}
.ac-f {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px !important;
  border-top: 1px solid var(--rule);
}
.ac-f .link {
  flex: none;
  min-height: 32px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
}
.msg {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--bad);
}
.msg:empty {
  display: none;
}
.q-l {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.q-l .qn {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--key);
}
.ph {
  color: var(--faint);
}
.opts {
  display: grid;
  gap: 8px;
}
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid var(--rule2);
  border-radius: 10px;
  cursor: pointer;
}
.opt:has(:checked) {
  border-color: var(--key);
  background: var(--tint);
}
.drop {
  position: relative;
  display: grid;
  gap: 8px;
}
.zone {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 18px 16px;
  border: 1.5px dashed var(--rule2);
  border-radius: 10px;
  text-align: center;
  font-size: 14px;
  color: var(--soft);
  cursor: pointer;
}
.zone svg {
  width: 22px;
  height: 22px;
  color: var(--key);
}
.zone b {
  font-size: 15px;
  color: var(--key);
}
.zone:hover,
.zone.over {
  border-color: var(--key);
  background: var(--tint);
}
.sr:focus-visible + .zone {
  outline: 2.5px solid var(--key);
  outline-offset: 2px;
}
.files {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.files li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px 6px 6px 8px;
  border-radius: 8px;
  background: #f4f6f9;
  font-size: 14px;
}
.files img,
.files .fi {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--ice);
  color: var(--ice-ink);
  font-size: 10px;
  font-weight: 700;
}
.files small {
  display: block;
  font-size: 12px;
  color: var(--faint);
}
.ib {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--soft);
}
.ib svg {
  width: 18px;
  height: 18px;
}
.ib:hover {
  background: var(--tint);
  color: var(--key);
}
.ib:disabled {
  opacity: 0.3;
  background: none;
  cursor: default;
}
.nav2 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.nav2 .btn:last-child {
  flex: 1;
}
.acct {
  margin: 0 0 20px;
  border: 1px solid var(--rule2);
  border-radius: 12px;
  overflow: hidden;
}
.acct div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--rule);
}
.acct div:first-child {
  background: #f4f6f9;
}
.acct div:last-child {
  border-bottom: 0;
}
.acct dt {
  font-size: 13.5px;
  color: var(--faint);
}
.acct dd {
  margin: 0;
  font-weight: 600;
}
.acct .big {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.track {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.track li {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 0 0 22px 36px;
}
.track li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 3px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--rule2);
  border-radius: 50%;
  background: var(--card);
}
.track li::after {
  content: '';
  position: absolute;
  left: 12px;
  top: 25px;
  bottom: 1px;
  width: 2px;
  background: var(--rule);
}
.track li:last-child::after {
  display: none;
}
.track li.done::before {
  border-color: var(--key);
  background: var(--key);
}
.track li.on::before {
  border-color: var(--key);
  box-shadow:
    inset 0 0 0 3px var(--card),
    inset 0 0 0 9px var(--key);
}
.track b {
  font-size: 15.5px;
}
.track span {
  font-size: 13.5px;
  color: var(--soft);
}
.track li:not(.done):not(.on) b {
  color: var(--faint);
}
/* 개발 환경 안내(인증번호를 화면에 보여 줄 때). 운영에서는 나오지 않는다 */
.dev-hint {
  margin: 4px 0 0;
  padding: 11px 14px;
  border-radius: 8px;
  background: #f4f6f9;
  font-size: 13.5px;
  color: var(--soft);
}

/* 4. 어드민 */
.adm {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
  padding-top: 28px;
}
.adm > * {
  min-width: 0;
}
.adm-nav {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 2px;
}
.adm-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--soft);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
}
.adm-nav a:hover {
  background: var(--card);
  color: var(--ink);
}
.adm-nav a.on {
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--key);
}
.adm-nav i {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 20px;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  color: var(--faint);
}
.adm-nav a.on i {
  color: var(--key);
}
.adm-nav-h {
  margin: 0;
  padding: 18px 12px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--faint);
}
.badge {
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--key);
  color: var(--on-key);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
}
.adm-h {
  margin-bottom: 18px;
}
.adm-h h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 27px);
  font-weight: 800;
}
.adm-h h1 i {
  margin-right: 8px;
  font-style: normal;
  color: var(--key);
}
.adm-h .sub {
  max-width: 44em;
  margin: 0;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.chip {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--rule2);
  border-radius: 8px;
  background: var(--card);
  color: var(--soft);
  font-size: 13.5px;
  font-weight: 600;
}
.chip b {
  margin-left: 5px;
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed='true'] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.apps {
  display: grid;
  gap: 8px;
}
.app {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.app.open {
  border-color: var(--ink);
}
.app-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 14px 8px 8px;
}
.app-main {
  display: grid;
  grid-template-columns: 96px minmax(0, 1.2fr) minmax(0, 1fr) 92px;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
}
.app-main:hover {
  background: #f4f6f9;
}
.app-main small {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--faint);
}
.app-main .no,
.app-main .when {
  font-size: 12.5px;
  color: var(--faint);
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.pill.req {
  background: var(--warn-bg);
  color: var(--warn);
}
.pill.wait {
  background: var(--rule);
  color: var(--soft);
}
.pill.ok {
  background: var(--tint);
  color: var(--key);
}
.done-at {
  min-width: 78px;
  font-size: 12.5px;
  color: var(--faint);
  text-align: right;
}
.el.late {
  color: var(--bad);
  font-weight: 600;
}
.app-d {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 32px;
  padding: 20px 18px 22px;
  border-top: 1px solid var(--rule);
  background: #f8fafc;
}
.app-d h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--faint);
}
.app-d .wide {
  grid-column: 1/-1;
}
.app-d p {
  margin: 10px 0 0;
}
.kv {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 6px 12px;
  margin: 0;
  font-size: 14px;
}
.kv dt {
  color: var(--faint);
}
.kv dd {
  margin: 0;
  font-weight: 500;
}
.calc-l {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 !important;
  font-size: 15px;
}
.ans {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 4px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.ans li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 5px;
  align-items: baseline;
  padding: 5px 7px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--card);
  font-size: 12.5px;
  color: var(--faint);
}
.ans li b {
  font-size: 13px;
  color: var(--ink);
}
.ans li i {
  font-style: normal;
  font-size: 11.5px;
}
.ans .o {
  border-color: var(--key);
}
.ans .o b {
  color: var(--key);
}
.ans .neg {
  border-color: var(--bad);
}
.ans .neg i {
  color: var(--bad);
}
.qa {
  display: grid;
  gap: 12px;
  margin: 0;
  font-size: 14px;
}
.qa dt {
  font-size: 13px;
  color: var(--faint);
}
.qa dd {
  margin: 2px 0 0;
  white-space: pre-wrap;
}
.filechip {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 2px 9px;
  border: 1px solid var(--rule2);
  border-radius: 6px;
  background: var(--card);
  font-size: 13px;
}
.empty {
  margin: 0;
  padding: 28px 16px;
  border: 1.5px dashed var(--rule2);
  border-radius: 12px;
  text-align: center;
  color: var(--faint);
}
.fe {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}
.fe > * {
  min-width: 0;
}
.fe-list,
.docs {
  display: grid;
  gap: 10px;
}
.docs {
  margin-bottom: 14px;
}
.qcard {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.qcard:focus-within {
  border-color: var(--ink);
}
.qcard .field {
  margin: 0;
}
.qcard-h {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
}
.qcard-h .qn {
  padding-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--key);
}
.qcard-t {
  display: grid;
  gap: 6px;
}
.in.title {
  font-size: 16.5px;
  font-weight: 600;
}
.in.desc {
  min-height: 42px;
  padding: 8px 14px;
  border-style: dashed;
  font-size: 14.5px;
}
.typeseg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.typ {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 6px;
  border: 1px solid var(--rule2);
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--soft);
  text-align: center;
  cursor: pointer;
}
.typ svg,
.addb svg {
  flex: none;
  width: 17px;
  height: 17px;
}
.typ:has(:checked) {
  border-color: var(--key);
  background: var(--tint);
  color: var(--key);
}
.typ:has(:focus-visible) {
  outline: 2.5px solid var(--key);
  outline-offset: 2px;
}
.optl {
  display: grid;
  gap: 6px;
}
.optrow {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}
.optrow .in {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 15px;
}
.mk {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--rule2);
  border-radius: 50%;
}
.mk.sq {
  border-radius: 4px;
}
.link.add {
  justify-self: start;
  color: var(--key);
  font-weight: 600;
}
.fopts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  font-size: 14px;
}
.fopts > span {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--faint);
}
.chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  cursor: pointer;
}
.qfoot,
.doc-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
}
.qfoot {
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}
.sp {
  flex: 1;
}
.sw {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.swi {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: none;
  width: 40px;
  height: 24px;
  margin: 0;
  border-radius: 999px;
  background: var(--rule2);
  cursor: pointer;
  transition: background 0.15s;
}
.swi::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
.swi:checked {
  background: var(--key);
}
.swi:checked::after {
  transform: translateX(16px);
}
.addbar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 10px 10px 16px;
  border-radius: 12px;
  background: var(--dark);
  color: var(--dark-ink);
}
.addbar > span {
  margin-right: 4px;
  font-size: 13.5px;
  font-weight: 600;
}
.addb {
  flex: 1 1 104px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: none;
  color: var(--dark-ink);
  font-size: 14px;
  font-weight: 600;
}
.addb:hover {
  border-color: #fff;
  background: #fff;
  color: var(--dark);
}
.pv {
  position: sticky;
  top: 16px;
  padding: 12px;
  border: 1px solid var(--rule2);
  border-radius: 20px;
  background: var(--card);
}
.pv-h {
  margin: 2px 0 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--faint);
}
.pv-b {
  max-height: 70vh;
  padding: 6px 8px 4px;
  overflow: auto;
}
.pv-b .field {
  margin-bottom: 16px;
}
.pv-k {
  margin: 14px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--faint);
}
.pv-k:first-child {
  margin-top: 0;
}
.pv-b .lede {
  margin-bottom: 6px;
  font-size: 15px;
}
.tbl {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.tbl table {
  width: 100%;
  min-width: 440px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.tbl th,
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
.tbl th {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--faint);
}
.tbl tr:last-child td {
  border-bottom: 0;
}
.stats table {
  min-width: 780px;
}
.stats .r {
  text-align: right;
}
.stats small {
  color: var(--faint);
}
.bar {
  display: block;
  height: 5px;
  min-width: 80px;
  margin-top: 5px;
  border-radius: 99px;
  background: var(--rule);
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--key);
}
@media (max-width: 1080px) {
  .fe {
    grid-template-columns: 1fr;
  }
  .pv {
    position: static;
  }
  .pv-b {
    max-height: none;
  }
}
@media (max-width: 900px) {
  .adm {
    grid-template-columns: 1fr;
  }
  .adm-nav {
    position: static;
    display: flex;
    gap: 6px;
    padding-bottom: 4px;
    overflow-x: auto;
  }
  .adm-nav a {
    background: var(--card);
    white-space: nowrap;
  }
  .adm-nav a.on {
    box-shadow: inset 0 -3px 0 var(--key);
  }
  .adm-nav-h {
    display: none;
  }
  .app-d {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .app-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .app-main {
    grid-column: 1/-1;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: 2px;
  }
  .app-main .no {
    order: 3;
  }
  .app-main .when {
    order: 4;
    text-align: right;
  }
  .done-at {
    text-align: left;
  }
  .typeseg {
    grid-template-columns: 1fr 1fr;
  }
}

/* 대화상자 · 알림 */
dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--r);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 24px 60px -24px rgba(15, 31, 53, 0.5);
}
dialog::backdrop {
  background: rgba(15, 31, 53, 0.55);
}
.dlg-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 12px 12px 22px;
  border-bottom: 1px solid var(--rule);
}
.dlg-h h2 {
  margin: 0;
  font-size: 18px;
}
.dlg-b {
  max-height: 52vh;
  padding: 18px 22px;
  overflow: auto;
  font-size: 14.5px;
  line-height: 1.75;
  white-space: pre-wrap;
}
.dlg-f {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 22px 18px;
}
.toast {
  position: fixed;
  left: 50%;
  top: 14px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--dark);
  color: var(--dark-ink);
  font-size: 14px;
  transform: translateX(-50%);
}
.toast button {
  min-height: 32px;
  border: 0;
  background: none;
  color: var(--dark-on);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ───────────────────────────────────────────────────────────────────────────
   5. 설치 버전에서 추가된 부분
   ─────────────────────────────────────────────────────────────────────────── */

/* 머리글 오른쪽 버튼: '신청 현황 조회'(의뢰인), '의뢰인 화면'·'로그아웃'(어드민) */
.top-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--rule2);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.top-link:hover {
  border-color: var(--ink);
}
.top-name {
  font-weight: 600;
  color: var(--ink);
}
/* 좁은 화면에서 머리글 글자가 줄바꿈되거나 찌그러지지 않게 한다 */
.brand,
.top-ctx,
.top-link {
  flex: none;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .top-name {
    display: none;
  }
  .top-r {
    gap: 8px;
  }
  /* 어드민은 버튼이 많아 로고만 남긴다 */
  body[data-view='admin'] .brand span {
    display: none;
  }
}

/* 카카오 우편번호 검색창: 주소 칸 바로 아래에 펼쳐진다(app.js 의 addrOpenPostcode).
   카카오 약관상 검색창 아래의 로고·안내를 가리면 안 되므로 안쪽 높이를 줄여 자르지 않는다. */
.pc {
  margin-top: 6px;
  border: 1px solid var(--rule2);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
}
.pc-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 6px 0 14px;
  border-bottom: 1px solid var(--rule);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--soft);
}
.pc-h .link {
  min-height: 40px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
}
.pc-b {
  height: 460px; /* 카카오가 결과 높이를 알려 주면 app.js 가 400~560px 사이로 맞춘다 */
}
.pc-wait {
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--faint);
}

/* 파일을 올리는 동안 */
.zone.busy {
  opacity: 0.55;
  pointer-events: none;
}

/* 위험한 동작 버튼(개인정보 파기) */
.btn.danger {
  border-color: var(--bad);
  background: var(--bad);
  color: #fff;
}
.btn.danger:hover {
  border-color: #a01f30;
  background: #a01f30;
}
.btn.ghost.danger {
  border-color: var(--rule2);
  background: var(--card);
  color: var(--bad);
}
.btn.ghost.danger:hover {
  border-color: var(--bad);
  background: var(--card);
}

/* 어드민 로그인 */
.login {
  display: grid;
  justify-items: center;
  padding-top: clamp(32px, 9vh, 96px);
}
.login .panel {
  width: 100%;
  max-width: 420px;
}
.login .sub {
  margin-bottom: 18px;
}

/* 신청 내역 검색 · 전환 분석 기간 */
.apps-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--soft);
}
.apps-tools label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.apps-tools .in {
  flex: 1 1 220px;
  max-width: 360px;
  min-height: 42px;
  padding: 8px 12px;
  font-size: 15px;
}
.apps-tools .in[type='date'] {
  flex: 0 0 auto;
  width: auto;
}
.apps-tools .btn.sm {
  min-height: 42px;
}

/* 신청 내역 아래 '더 보기' */
.more {
  margin: 12px 0 0;
  text-align: center;
}

/* 메뉴 배지(확인 필요 개수)와 저장하지 않은 변경 표시 */
.badge.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.adm-nav .dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: #e08a00;
}

/* 설정 화면 아래 저장 막대: 변경이 있을 때만 나온다 */
.savebar {
  position: sticky;
  bottom: 12px;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 16px;
  padding: 10px 12px 10px 16px;
  border-radius: 12px;
  background: var(--dark);
  color: var(--dark-ink);
  font-size: 14px;
}
.savebar span {
  flex: 1 1 220px;
}
.savebar .btn:not(.ghost) {
  border-color: #fff;
  background: #fff;
  color: var(--dark);
}
.savebar .btn.ghost {
  border-color: rgba(255, 255, 255, 0.35);
  background: none;
  color: var(--dark-ink);
}
.savebar .btn.ghost:hover {
  border-color: #fff;
  background: none;
}

/* 신청 상세: 동의 기록, 관리 */
.clog {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.clog small {
  margin-left: 6px;
  color: var(--faint);
}
.manage p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

/* 라이브 준비 상태 */
.ready {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ready li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.ready li.todo {
  border-color: #ecd49c;
}
.ready b {
  font-size: 15px;
}
.ready p {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--soft);
}
@media (max-width: 720px) {
  .ready li {
    grid-template-columns: 1fr;
    gap: 8px;
    justify-items: start;
  }
}
