/* 홈 1페이지 대시보드 (index.html 전용). 데스크톱 1440×900 한 화면에 들어가게 맞춘다. */
.main.main-dash { max-width: none; padding: 56px 36px 140px; }
.main-dash .page-hud { margin: -56px -36px 16px; padding: 10px 36px 0; }
.main-dash .page-hud .hud-row { padding-bottom: 8px; }
.main-dash .hud-bar { margin: 0 -36px; }

.dash { --ink: #1a1a22; --mut: #6f6f7a; --line: rgba(15,15,20,.08); --pk: #ea4b71; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.dash-tag { font-size: 12px; font-weight: 700; color: var(--accent-strong); letter-spacing: .01em; }
.dash h1 { font-size: 27px; line-height: 1.3; letter-spacing: -.02em; margin: 4px 0 4px; }
.dash-sub { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-soft); }
.dash-cta { display: flex; gap: 6px; flex: none; }
.dash-cta .home-btn { padding: 8px 13px; font-size: 13.5px; white-space: nowrap; }

/* KPI 줄 */
.kp-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.kp { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px 9px; min-width: 0; }
.kp-r { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kp-l { font-size: 11.5px; font-weight: 700; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kp-v small { font-size: 13px; font-weight: 700; color: var(--mut); margin-left: 2px; }
.kp-s { font-size: 11px; color: var(--mut); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-ring { width: 46px; height: 46px; flex: none; }
.kp-r > div { min-width: 0; }
.kp-comp { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; margin: 5px 0 4px; }
.kp-hist { display: flex; align-items: flex-end; gap: 2px; height: 20px; margin: 2px 0 3px; }
.kp-hist span { flex: 1; background: #d9d6cf; border-radius: 2px 2px 0 0; }
.kp-hist span.is-med { background: var(--pk); }
.kp-fun { display: flex; flex-direction: column; gap: 2px; margin: 3px 0 3px; }
.kp-fun span { display: block; height: 5px; background: #2b2d42; border-radius: 3px; position: relative; opacity: .85; }
.kp-fun span:nth-child(2) { background: #8a8c9e; } .kp-fun span:nth-child(3) { background: var(--pk); }
.kp-fun i { display: none; }

/* 패널 그리드 */
.pn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 306px 254px; gap: 10px; }
.pn { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.pn-hero { grid-column: span 2; }
.pn header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pn h3 { font-size: 14.5px; margin: 0; letter-spacing: -.01em; }
.pn header a, .pn-sub { font-size: 12px; color: var(--mut); border: 0; white-space: nowrap; }
.pn header a:hover { color: var(--accent-strong); }
.pn-note { font-size: 11.5px; line-height: 1.45; color: var(--mut); margin: auto 0 0; }

/* Top 12 막대 */
.lg { font-size: 11px; color: var(--mut); display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.lg i { width: 10px; height: 8px; border-radius: 2px; display: inline-block; }
.lg .d1 { background: var(--pk); } .lg .d2 { background: #f7c4d1; margin-left: 8px; }
.lg span { margin-left: auto; }
.rq-list { display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
.rq { display: grid; grid-template-columns: 146px 1fr 38px 112px; align-items: center; gap: 8px; height: 19px; }
.rq-k { font-size: 12.5px; font-weight: 600; color: var(--ink); border: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-k:hover { color: var(--accent-strong); }
.rq-bar { position: relative; height: 12px; background: #f4f2ee; border-radius: 6px; overflow: hidden; }
.rq-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.rq-all { background: #f7c4d1; } .rq-req { background: var(--pk); }
.dash.is-on .rq-bar span { width: var(--w); }
.rq-n { font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
.rq-ch { font-size: 11px; color: var(--mut); white-space: nowrap; overflow: hidden; }
.rq-ch a { display: inline-block; padding: 0 5px; border-radius: 4px; background: #f3f3ef; color: var(--text-soft); border: 0; font-weight: 600; line-height: 17px; font-variant-numeric: tabular-nums; }
.rq-ch a:hover { background: var(--accent-bg); color: var(--accent-strong); }

/* 50장 지도 */
.wf-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; align-content: start; }
.wf { aspect-ratio: 1.4; border-radius: 6px; background: var(--c); color: #fff; border: 0; display: grid; place-items: center; position: relative;
  font-size: 10.5px; font-variant-numeric: tabular-nums; opacity: 0; transform: scale(.6); transition: opacity .35s, transform .35s, box-shadow .15s; }
.dash.is-on .wf { opacity: .92; transform: none; }
.wf b { font-weight: 700; }
.wf:hover { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); color: #fff; }
.wf.done::after { content: '✓'; position: absolute; right: 2px; top: -1px; font-size: 9px; }
.wf.done { opacity: .45 !important; }
.wf-lg { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--mut); margin-top: auto; padding-top: 6px; }
.wf-lg i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

/* 나비 막대 */
.bf-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--mut); padding: 0 2px 2px; }
.bf-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.bf { display: grid; grid-template-columns: 1fr 92px 1fr; align-items: center; gap: 6px; }
.bf b { font-size: 12px; text-align: center; white-space: nowrap; }
.bf-l, .bf-r { display: flex; align-items: center; gap: 4px; height: 12px; }
.bf-l { justify-content: flex-end; }
.bf-l span, .bf-r span { height: 12px; width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.bf-l span { background: #2b2d42; border-radius: 6px 2px 2px 6px; }
.bf-r span { background: var(--pk); border-radius: 2px 6px 6px 2px; }
.dash.is-on .bf-l span, .dash.is-on .bf-r span { width: var(--w); }
.bf i { font-style: normal; font-size: 11px; color: var(--mut); font-variant-numeric: tabular-nums; min-width: 14px; }
.bf-l i { text-align: right; }

/* 도넛 */
.dn { display: flex; align-items: center; gap: 12px; flex: 1; }
.dn svg { width: 128px; height: 128px; flex: none; }
.dn-n { font-size: 22px; font-weight: 800; fill: var(--ink); }
.dn-s { font-size: 8.5px; fill: var(--mut); font-weight: 600; }
.dn ul { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; }
.dn li { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.9; color: var(--text-soft); }
.dn li i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.dn li b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* 캡스톤 */
.cap-img { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 112px; }
.cap-img img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; }
.cap-kp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 7px; }
.cap-kp span { background: #f7f6f2; border-radius: 8px; padding: 5px 6px; font-size: 10.5px; color: var(--mut); line-height: 1.3; text-align: center; }
.cap-kp b { display: block; font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.cap-stack { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.cap-stack span { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--accent-bg); color: var(--accent-strong); }

.dash-src { font-size: 11px; color: var(--mut); margin-top: 8px; }
h2.dash-after { margin-top: 56px; }
.main-dash > :not(.dash):not(.page-hud) { max-width: 820px; }

/* 1100px 이하: 2열, 높이 자동 */
@media (max-width: 1100px) {
  .dash-head { flex-direction: column; align-items: flex-start; }
  .kp-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .pn-hero { grid-column: 1 / -1; }
  .pn { min-height: 250px; }
  .rq-list { gap: 6px; }
}
@media (max-width: 780px) {
  .main.main-dash { padding: 48px 16px 96px; }
  .main-dash .page-hud { margin: -48px -16px 14px; padding: 10px 16px 0; }
  .main-dash .hud-bar { margin: 0 -16px; }
  .dash h1 { font-size: 22px; }
  .dash-cta { flex-wrap: wrap; }
  .kp-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kp-row .kp:last-child { grid-column: 1 / -1; }
  .pn-grid { grid-template-columns: minmax(0, 1fr); }
  .rq { grid-template-columns: 104px 1fr 34px; height: auto; }
  .rq-k { font-size: 12px; }
  .rq-ch { display: none; }
  .lg span { display: none; }
  .wf-grid { grid-template-columns: repeat(10, 1fr); }
}
