/* 공개 사이트: 개인 데스크(app.css)의 색·글자·패널을 그대로 쓰고, 틀만 한 장짜리 스크롤 페이지로 바꾼다 */
body.pub { display: block; overflow: auto; height: auto; min-height: 100%; word-break: keep-all; overflow-wrap: anywhere; }  /* 한글은 낱말 단위로 줄바꿈 */
body.pub header.top { position: sticky; top: 0; z-index: 30; height: 52px; background: var(--page); }
body.pub main { overflow: visible; max-width: 1240px; margin: 0 auto; padding: var(--s1) var(--s4) var(--s6); }
body.pub footer.bottom { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px var(--s4) 18px; max-width: 1240px; margin: 0 auto; font-size: var(--fs-xs); color: var(--muted); }

.asof { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; max-width: 1240px; margin: 0 auto; padding: 6px calc(var(--s4) + 14px) 8px; font-size: var(--fs-sm); color: var(--muted); }
.asof[hidden] { display: none; }
.asof b { color: var(--text); font-weight: 700; }
.asof b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-right: 7px; vertical-align: 1px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.pad { padding: 0 14px 14px; }
.pad0 { padding: 0 14px 12px; margin: 0; }
.lead { color: var(--text); font-size: var(--fs-lg); line-height: 1.6; margin: 0; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 0 14px 14px; }
.kv > div { background: var(--panel2); border-radius: var(--r-md); padding: 10px 12px; }
.kv .l { color: var(--muted); font-size: var(--fs-xs); }
.kv .v { color: var(--text); font-size: var(--fs-xl); font-weight: 700; }
.kv .s { color: var(--dim); font-size: var(--fs-xs); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.cols.b { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.col { display: grid; gap: 10px; min-width: 0; }
.sig { display: grid; grid-template-columns: 40px 170px minmax(0, 1fr); align-items: start; gap: 4px 10px; padding: 8px 14px; border-top: 1px solid var(--line); }
.sig .n { color: var(--text); font-weight: 700; text-align: right; }
.sig a.lab { color: var(--text); }
.sig a.lab:hover { text-decoration: underline; }
.sig .tks { min-width: 0; }
.split { display: flex; gap: 2px; height: 8px; margin: 2px 14px 6px; border-radius: 4px; overflow: hidden; }
.split i { display: block; min-width: 2px; }
/* 오른 = 초록, 내린 = 빨강: 같은 화면의 TradingView 위젯 색에 맞춤(개인 데스크는 빨강/파랑) */
.split .u { background: var(--tp); } .split .d { background: var(--up); } .split .f { background: var(--chip2); }
.gain { color: var(--tp); } .loss { color: var(--up); }
.splitlab { display: flex; justify-content: space-between; gap: 8px; padding: 0 14px 12px; font-size: var(--fs-sm); }
.splitlab b { font-weight: 600; }
.read { margin: 0; color: var(--text); font-size: var(--fs-md); line-height: 1.6; }
p.read { margin: 0 14px 10px; padding: 10px 12px; border-radius: var(--r-md); background: rgba(49, 130, 246, .12); color: var(--text); font-weight: 600; }
.terms { padding: 4px 14px 6px; }
.terms summary { cursor: pointer; padding: 8px 0; color: var(--text); font-weight: 700; }
.tk { display: inline-block; padding: 2px 8px; margin: 0 4px 4px 0; border-radius: 6px; background: var(--chip); color: var(--text); font-size: var(--fs-sm); font-weight: 600; }
.tk:hover { background: var(--chip2); }
.lbl { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; padding: 0 14px 14px; }
.lbl > div { background: var(--panel2); border-radius: var(--r-md); padding: 9px 12px; }
.lbl .l { color: var(--muted); font-size: var(--fs-xs); }
.lbl .v { color: var(--text); font-weight: 700; }
.lbl .v.good { color: var(--tp); } .lbl .v.bad { color: var(--stop); }
/* 본 전략에서 이 종목: 지금 상태 한 줄 */
.sst { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 0 14px 12px; color: var(--text2); font-size: var(--fs-sm); }
.sst .tag { margin: 0; font-size: var(--fs-md); padding: 4px 10px; }
.tv { position: relative; min-height: 120px; }
.tv .tradingview-widget-container { width: 100%; height: 100%; }
.tvtape { min-height: 46px; }
.tvheat { height: 520px; }
.tvchart { height: 460px; }
.tvinfo { min-height: 190px; }
.tvhot { height: 440px; }
.tvnote { padding: 6px 14px 10px; font-size: var(--fs-xs); color: var(--dim); }
/* 위젯이 넣는 스타일(저작권 줄 높이 32px, 띠 상자 높이 고정)이 빈 칸을 만들어서 덮어씀 */
.tv .tradingview-widget-copyright.tvnote, .wtv .tradingview-widget-copyright.tvnote { line-height: 1.5 !important; font-size: var(--fs-xs) !important; text-align: center; }
/* 띠 위젯: 상자 높이를 안 정해 주면 위젯이 iframe을 calc(100% - 32px)로 잡을 때 150px로 늘어난다(띠 아래 큰 빈 칸).
   띠 한 줄 높이(46px)로 못 박는다 */
.tvtape .tradingview-widget-container { height: auto !important; }
.tvtape iframe { height: 46px !important; }
.tvtape .tradingview-widget-copyright.tvnote { padding: 2px 14px 6px; }
svg.line { width: 100%; height: 150px; display: block; }
.chart { position: relative; margin: 4px 14px 0; }
.chart .yl { position: absolute; right: 0; transform: translateY(-100%); font-size: 11px; color: var(--dim); pointer-events: none; }
.xt { position: relative; height: 18px; margin: 2px 14px 6px; font-size: 11px; color: var(--dim); }
.xt span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.spark { display: block; width: 100%; height: 24px; margin-top: 6px; }
.kv.wide { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.kv.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kv.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0 14px 10px; font-size: var(--fs-xs); color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.tblwrap { overflow-x: auto; }
table.grid td.l, table.grid th.l { text-align: left; }
.nmcell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.hd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 14px; }
.hd h1 { margin: 0; font-size: var(--fs-3xl); color: var(--text); }
.hd .nm { color: var(--text2); font-size: var(--fs-lg); }
.off { color: var(--stop); font-weight: 700; margin-left: 2px; }
/* 만든 방법: 흐름도(홈서버 → Databricks → 홈서버) · 정한 것 · 쓴 것 */
.pipe { display: flex; align-items: flex-start; gap: 4px; padding: 4px 14px 16px; }
.zone { position: relative; flex: 1 1 0; min-width: 0; border: 1px dashed var(--chip2); border-radius: var(--r-lg); padding: 30px 8px 8px; }
.zone.db { flex-grow: 3.3; border: 1px solid rgba(49, 130, 246, .38); background: rgba(49, 130, 246, .05); }
.zone.out { flex-grow: 2.15; }
.zl { position: absolute; top: 9px; left: 12px; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.zone.db .zl { color: var(--text2); }
.zn { display: flex; align-items: flex-start; gap: 4px; }
.zone.db .zn { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; }
.pn { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; }
.pn b { color: var(--text); font-size: var(--fs-lg); }
.pn > span { color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.pn.gold { border-color: rgba(49, 130, 246, .6); }
.pn.ai { border-style: dashed; border-color: var(--chip2); background: transparent; }
.pn.site { border-color: var(--chip2); }
.pc { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.pc i { font-style: normal; font-size: var(--fs-xs); color: var(--text2); background: var(--chip); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.pa { flex: 0 0 auto; display: grid; place-items: center; width: 22px; align-self: center; color: var(--dim); }
.pipe > .pa { align-self: flex-start; margin-top: 66px; }
.pa svg, .pv svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pbr { grid-column: 5; display: flex; flex-direction: column; }
.pv { display: grid; place-items: center; height: 30px; color: var(--dim); }
.whys { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; padding: 4px 14px 14px; }
.whys > div { display: grid; align-content: start; gap: 6px; background: var(--panel2); border-radius: var(--r-md); padding: 12px 14px; }
.whys .wn { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--chip); color: var(--text2); font-size: var(--fs-xs); font-weight: 700; }
.whys b { color: var(--text); font-size: var(--fs-lg); line-height: 1.35; }
.whys p, .step p, .sells p { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; }
.stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; padding: 4px 14px 14px; }
.stack b { display: block; margin-bottom: 6px; color: var(--text); font-size: var(--fs-md); }
/* 전략: 어떻게 골랐나(단계 칸 + 칸 그림) · 언제 파나. 한 색 단계: 종목군 → 강한 성장주 → 위 20 → 보유 */
.l0 { background: var(--chip); }
.l1 { background: #234a85; }
.l2 { background: #3182f6; }
.l3 { background: #a9cdff; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 4px 14px 14px; }
.step { position: relative; display: grid; align-content: start; gap: 4px; background: var(--panel2); border-radius: var(--r-md); padding: 12px 14px; }
.step + .step::before { content: ""; position: absolute; left: -11px; top: 50%; width: 6px; height: 6px; border-top: 2px solid var(--dim); border-right: 2px solid var(--dim); transform: translateY(-50%) rotate(45deg); }
.step .sl { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.step .sl i { width: 10px; height: 10px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(242, 246, 255, .22); }
.step .big, .sells .big { color: var(--text); font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.step b { color: var(--text); font-size: var(--fs-md); }
.waf { display: grid; grid-auto-flow: column; grid-template-rows: repeat(10, auto); grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 0 14px 4px; }  /* 세로로 채워 왼쪽 = 강한 업종 */
.wax { display: flex; justify-content: space-between; gap: 12px; padding: 2px 14px 0; color: var(--dim); font-size: var(--fs-xs); }
.waf i { aspect-ratio: 1; border-radius: 2px; }
.waf i:hover { outline: 1px solid var(--text); }
.sells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 4px 14px 14px; }
.sells > div { display: grid; align-content: start; gap: 6px; background: var(--panel2); border-radius: var(--r-md); padding: 12px 14px; }
.sells .big { display: flex; align-items: center; gap: 8px; font-size: 22px; }
.sells .tag { margin: 0; }
/* 종목 */
.fil { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 4px 10px; padding: 8px 14px; border-top: 1px solid var(--line); }
.fil .lab { color: var(--text2); }
table.grid.src td { white-space: normal; }

/* 홈 · 전략 머리 */
.hero2 { padding: 18px 14px 12px; }
.hero2 h1 { margin: 0 0 6px; font-size: 30px; line-height: 1.25; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.hero2 .when { margin: 0 0 6px; color: var(--text); font-size: var(--fs-lg); font-weight: 600; }
.hero2 .sub { margin: 0; max-width: 760px; color: var(--text2); font-size: var(--fs-md); line-height: 1.6; }
.hero2 .sub a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* 홈: 카드 10장 + 바뀐 것 */
.hgrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 10px; align-items: start; margin-bottom: 10px; }
.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.card { display: grid; gap: 4px; align-content: start; min-height: 132px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--text2); }
a.card:hover { background: var(--panel2); border-color: var(--chip2); }
.card.sk1 { background: var(--panel); opacity: .6; }
.card.off { opacity: .72; }
.card .cw { color: var(--stop); font-size: var(--fs-xs); line-height: 1.4; }
/* W15 막대: 15칸, 산 값 아래 이어진 날만큼 주황 */
.w15 { display: grid; gap: 3px; font-size: var(--fs-xs); }
.w15b { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 2px; }
.w15b i { height: 5px; border-radius: 2px; background: var(--chip); }
.w15b i.on { background: var(--stop); }
.w15t { color: var(--stop); }
.w15r { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 6px; white-space: nowrap; }
.card.cash { background: transparent; border-style: dashed; }
.card.cash .ct b { color: var(--muted); }
.card .ct { display: flex; align-items: center; gap: 6px; }
.card .ct b { color: var(--text); font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.card .ct .tag { margin: 0; }
.card .rk { margin-left: auto; color: var(--dim); font-size: var(--fs-xs); }
.card .cs { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .cb { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: var(--fs-sm); white-space: nowrap; }
.card .cb b { font-size: var(--fs-lg); font-weight: 700; }
.cspark { display: block; width: 100%; height: 30px; margin: 4px 0 2px; }
.cspark polyline { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; }
.cspark .z { stroke: var(--line); stroke-dasharray: 3 3; }
.cspark.none { height: auto; color: var(--dim); font-size: var(--fs-xs); }
.mv { padding: 0 14px 10px; }
.mvh { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; margin-bottom: 6px; }
.mvh .ic { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.mvh .ic.plus { background: var(--blue); }
.mvh .ic.minus { background: var(--up); }
.mvr { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0 0; font-size: var(--fs-sm); }
.mvr .tk { margin: 0; }
.why1 { color: var(--dim); font-size: var(--fs-xs); padding: 2px 0 4px; }
.mv + .note, .hgrid .note { display: block; padding: 0 14px 12px; }

/* 홈: 사무실 아래 한 줄 요약(항목마다 그 탭으로) */
.hsum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.hs { display: grid; gap: 2px; align-content: start; min-height: 74px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--text2); }
a.hs:hover { background: var(--panel2); border-color: var(--chip2); }
.hs.sk1 { opacity: .6; }
.hs span { color: var(--muted); font-size: var(--fs-xs); }
.hs b { color: var(--text); font-size: 20px; font-weight: 800; white-space: nowrap; }
.hs b.gain { color: var(--tp); } .hs b.loss { color: var(--up); }
.hs em { font-style: normal; color: var(--dim); font-size: var(--fs-xs); }

/* 전략 › 기록: 수익 곡선 */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 14px 10px; }
.kpis > div { display: grid; gap: 2px; background: var(--panel2); border-radius: var(--r-md); padding: 10px 12px; }
.kpis span { color: var(--muted); font-size: var(--fs-xs); }
.kpis b { color: var(--text); font-size: 24px; font-weight: 800; white-space: nowrap; }
.kpis em { font-style: normal; color: var(--dim); font-size: var(--fs-xs); }
.cv { position: relative; margin: 6px 14px 0; }
.cvplot { position: relative; }
.cvplot svg, .cvdd svg { display: block; width: 100%; }
.cvplot svg { height: 240px; }
.cvdd { position: relative; margin-top: 4px; }
.cvdd svg { height: 64px; }
.cv .grid, .bump .grid { stroke: var(--line); }
.cv .base { stroke: rgba(216, 223, 237, .28); stroke-dasharray: 4 4; }
.cv .st { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; }
.cv .spx { fill: none; stroke: rgba(216, 223, 237, .55); stroke-width: 1.5; stroke-linejoin: round; }
.cv .live { fill: rgba(49, 130, 246, .10); }
.cvdd path { fill: rgba(245, 68, 90, .35); stroke: #f5445a; stroke-width: 1; vector-effect: non-scaling-stroke; }
.cv .yl, .bump .yl { position: absolute; left: 0; transform: translateY(-110%); font-size: 11px; color: var(--dim); pointer-events: none; }
.cv .endl { position: absolute; right: 0; padding: 1px 6px; border-radius: 6px; font-size: var(--fs-xs); font-weight: 700; pointer-events: none; white-space: nowrap; }
.cv .endl.st { background: rgba(49, 130, 246, .9); color: #fff; stroke: none; }
.cv .endl.spx { background: rgba(60, 63, 72, .95); color: var(--text); stroke: none; }
.cv .ddl { position: absolute; left: 0; bottom: 2px; font-size: 11px; color: var(--dim); }
.cv .ddm { position: absolute; bottom: 0; transform: translate(-50%, 0); font-size: var(--fs-xs); font-weight: 700; color: #ff8a98; white-space: nowrap; }
.cv .cx, .bump .cx { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(242, 246, 255, .45); pointer-events: none; }
.cv .xt { margin: 2px 0 6px; }
.cv .xt span:first-child { transform: none; }
.cv .legend { padding: 0 0 10px; }
.cvfrom { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-xs); }
.cvfrom select { height: 32px; max-width: 132px; background: var(--chip); border: 0; border-radius: 8px; color: var(--text); padding: 0 8px; font: 600 var(--fs-sm) var(--font); cursor: pointer; }
.cvfrom select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.cvfrom option, .cvfrom optgroup { background: var(--panel); color: var(--text); }
/* 얼마가 됐을까(시작 금액 · 매달 더 넣기) */
.dca { margin: 4px 0 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.dcah { padding: 0 14px 8px; color: var(--text); font-size: var(--fs-md); font-weight: 700; }
.dcain { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0 14px 10px; }
.dcain label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-sm); }
.dcain input { width: 112px; height: 34px; background: var(--chip); border: 0; border-radius: 8px; color: var(--text); padding: 0 10px; font: 700 var(--fs-md) var(--font); text-align: right; font-variant-numeric: tabular-nums; }
.dcain input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.dcain span, .dcain em { white-space: nowrap; }
.dcain em { font-style: normal; color: var(--dim); }
.dca0 { grid-column: 1 / -1; color: var(--dim); font-size: var(--fs-sm); padding: 6px 0; }
#cv-wrap .cvplot, #cv-wrap .cvdd { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
#cv-wrap.grab .cvplot, #cv-wrap.grab .cvdd { cursor: grabbing; }
.cvreset { margin-left: auto; height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--chip); color: var(--text); font: 600 var(--fs-xs) var(--font); cursor: pointer; }
.cvreset:hover { background: var(--chip2); }
.cvreset:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.legend i.st, .tip i.st { background: var(--blue); }
.legend i.spx, .tip i.spx { background: rgba(216, 223, 237, .55); }
.legend i.dd { background: rgba(245, 68, 90, .6); height: 8px; }
.legend i.lv { background: rgba(49, 130, 246, .25); height: 8px; }
.legend i.put, .tip i.put { background: none; height: 0; border-radius: 0; border-top: 2px dashed rgba(242, 246, 255, .8); }
.cv .put { fill: none; stroke: rgba(242, 246, 255, .8); stroke-width: 1.5; stroke-dasharray: 5 4; }
/* 차트 단위: 100 기준 | 금액, 세로 눈금: 일반 | 로그 */
.cvmode { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 8px; padding: 0 14px 6px; }
.cvmode button, .seg button { height: 28px; padding: 0 12px; border: 0; background: var(--chip); color: var(--muted); font: 600 var(--fs-xs) var(--font); cursor: pointer; }
.cvmode button:first-child, .seg button:first-child { border-radius: 8px 0 0 8px; }
.cvmode button:last-child, .seg button:last-child { border-radius: 0 8px 8px 0; }
.cvmode button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.cvmode button:focus-visible, .seg button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
/* 전략 하위 탭(이번 주 · 기록 · 규칙) */
.subtab { display: inline-flex; justify-self: start; width: max-content; max-width: calc(100% - 28px); gap: 2px; margin: 0 14px 12px; padding: 3px; background: var(--chip); border-radius: 10px; }
.subtab a { display: grid; place-items: center; min-height: 36px; padding: 0 18px; border-radius: 8px; color: var(--muted); font-size: var(--fs-md); font-weight: 600; }
.seg { display: inline-flex; }
.subtab a:hover { color: var(--text); }
.subtab a[aria-current="page"] { background: var(--blue); color: #fff; }
.subtab a:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
/* 규칙: 한 주 흐름 */
.whys.how { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cycle { display: flex; align-items: center; gap: 10px; padding: 4px 14px 10px; }
.cy { flex: 1 1 0; display: flex; align-items: center; gap: 10px; min-width: 0; background: var(--panel2); border-radius: var(--r-md); padding: 12px 14px; color: var(--text); font-size: var(--fs-md); font-weight: 600; line-height: 1.4; }
.cy .wn { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff; font-size: var(--fs-xs); font-weight: 700; }
.ca { flex: none; width: 18px; height: 2px; background: var(--chip2); position: relative; }
.ca::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left-color: var(--chip2); border-right: 0; }
.kv .v.gain { color: var(--tp); } .kv .v.loss { color: var(--up); }
/* 기록: 통계 · 분포 · 해마다 · 달마다 · 지난 바꾸기 */
.st8 .v .bw { display: inline-flex; flex-wrap: wrap; gap: 0 6px; font-size: var(--fs-lg); }
.st8 .v a { color: var(--text); }
.st8 .l .tag { margin: 0 2px 0 0; }
.dhist { display: grid; gap: 6px; height: 160px; margin: 8px 14px 0; align-items: end; border-bottom: 1px solid var(--chip2); }
.dbar { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; height: 100%; min-width: 0; }
.dbar .dn { text-align: center; color: var(--text2); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; margin-bottom: 3px; }
.dbar i { display: block; min-height: 1px; border-radius: 4px 4px 0 0; }
.dbar i.neg, .legend i.neg { background: var(--up); } .dbar i.pos, .legend i.pos { background: var(--tp); }
.legend i.neg, .legend i.pos { height: 8px; }
.hticks { position: relative; height: 22px; margin: 0 14px 6px; color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.hticks span { position: absolute; top: 4px; transform: translateX(-50%); white-space: nowrap; }
.yc { position: relative; height: 220px; margin: 24px 14px 0 58px; }
.yg { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.yg.z { border-top-color: var(--chip2); }
.yg b { position: absolute; right: calc(100% + 8px); top: -8px; color: var(--dim); font-size: 11px; font-weight: 400; white-space: nowrap; }
.ycols { position: absolute; inset: 0; display: grid; }
.ycol { position: relative; }
.ycol i { position: absolute; width: 34%; min-height: 1px; border-radius: 3px; }
.ycol i.st { left: 14%; background: var(--blue); } .ycol i.spx { left: 52%; background: rgba(216, 223, 237, .45); }
.yv { position: absolute; transform: translateX(-50%); font-size: 11px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; }
.yv.st { left: 31%; color: var(--text); } .yv.spx { left: 69%; color: var(--muted); }
.yv .sm, .yx .sm { display: none; }
.ycx { position: absolute; top: 0; bottom: 0; background: rgba(214, 224, 239, .06); pointer-events: none; }
.yx { display: grid; margin: 6px 14px 8px 58px; color: var(--muted); font-size: var(--fs-xs); text-align: center; }
table.grid.mheat { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
table.grid.mheat td, table.grid.mheat th { padding: 6px 6px; text-align: center; }
table.grid.mheat th.l { position: sticky; left: 0; background: var(--panel); z-index: 1; text-align: left; white-space: nowrap; }
table.grid.mheat td.hm { color: var(--text); border-radius: 4px; box-shadow: inset 0 0 0 1px var(--panel); }
table.grid.mheat td.yr { font-weight: 700; }
.hctl { display: grid; gap: 10px; padding: 2px 14px 10px; }
.ychips { display: flex; flex-wrap: wrap; gap: 6px; }
.ychips button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--chip); color: var(--text2); font: 600 var(--fs-sm) var(--font); cursor: pointer; font-variant-numeric: tabular-nums; }
.ychips button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.ychips button:focus-visible, .srt:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.hctl2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hctl2 input[type=search] { width: 160px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); color: var(--text); font: var(--fs-sm) var(--font); }
.chk { display: inline-flex; align-items: center; gap: 6px; color: var(--text2); font-size: var(--fs-sm); cursor: pointer; }
.srt { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; }
table.grid.tr8 .tag { margin-left: 6px; }
.tip { position: fixed; z-index: 50; max-width: 260px; padding: 8px 10px; border-radius: var(--r-md); background: #26262e; border: 1px solid var(--chip2); color: var(--text); font-size: var(--fs-sm); line-height: 1.5; pointer-events: none; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.tip[hidden] { display: none; }
.tip b { display: block; margin-bottom: 2px; }
.tip i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* 전략: 업종 지도 */
.tm { position: relative; height: 460px; margin: 4px 14px 8px; border-radius: var(--r-md); overflow: hidden; }
.tile { position: absolute; box-sizing: border-box; border: 2px solid var(--panel); border-radius: 6px; padding: 6px 7px; overflow: hidden; color: #fff; display: flex; flex-direction: column; gap: 2px; }
.tile b { font-size: var(--fs-sm); font-weight: 700; line-height: 1.25; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.tile span { font-size: 11px; opacity: .9; }
.tile.own { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85); }
.tile .tpills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.tile .tpills a { padding: 1px 6px; border-radius: 999px; background: #fff; color: #111; font-size: 11px; line-height: 17px; font-weight: 800; }
.tile .hb.only { margin: auto; align-self: center; }
.tile .hb { white-space: nowrap; margin-top: auto; align-self: flex-start; padding: 0 6px; border-radius: 999px; background: #fff; color: #111; font-size: 11px; line-height: 17px; font-weight: 800; opacity: 1; }
.tmh { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 0 14px 6px; font-size: var(--fs-sm); }
.tmh > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tmh b { color: var(--text); margin-right: 2px; }
.tmh .tk { margin: 0; }
.dscale { display: flex; align-items: center; gap: 8px; padding: 0 14px 8px; font-size: var(--fs-xs); color: var(--muted); }
.dscale i { flex: 0 1 220px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgb(230, 103, 103), rgb(52, 52, 58), rgb(57, 135, 229)); }

/* 전략: 업종 순위 흐름 */
.bump { position: relative; margin: 6px 14px 0 44px; }
.bump svg { display: block; width: 100%; height: 300px; }
.bump polyline { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.bump .yl { left: -40px; transform: translateY(-50%); }
.bump .bl { position: absolute; transform: translateY(-50%); font-size: var(--fs-xs); color: var(--text2); white-space: nowrap; pointer-events: none; }
.bump .bl i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.xt.bx { margin-left: 44px; width: calc(100% - 58px); }
details.tbl { padding: 0 14px 10px; }
details.tbl summary { cursor: pointer; color: var(--muted); font-size: var(--fs-sm); padding: 4px 0; }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* 전략: 순위 위 20 */
.r20s { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; padding: 0 14px 8px; }
.r20 { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); min-width: 0; }
.r20 .n { width: 22px; text-align: right; color: var(--dim); font-weight: 700; }
.r20 .tk { margin: 0; }
.r20 .dim { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r20 .tag { margin: 0 0 0 auto; }
.r20.on .n { color: var(--blue); }
.wk { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; }
.fl { padding: 10px 14px; border-top: 1px solid var(--line); }
.fl:first-of-type { border-top: 0; }
.fl p { margin: 6px 0; color: var(--text2); line-height: 1.5; }
.fl blockquote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--line); color: var(--dim); font-size: var(--fs-sm); }
.fl a.b { font-size: var(--fs-sm); }
table.grid.hist td { white-space: normal; }
table.grid.hist td:first-child { white-space: nowrap; vertical-align: top; }
table.grid.hist .tk { white-space: nowrap; display: inline-block; }
.sold { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin: 0 10px 4px 0; white-space: nowrap; }
.sold .tag { margin: 0; padding: 1px 5px; }
.sold b { font-size: var(--fs-sm); }
.sold .dim { font-size: var(--fs-xs); }

.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; padding: 0 14px 14px; }
.wi { border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-width: 0; }
.wh { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.wh .tag { margin: 0; }
.wtv { min-height: 150px; }
.wi p { margin: 8px 0 0; color: var(--text2); line-height: 1.5; font-size: var(--fs-sm); }

.rgwrap { overflow-x: auto; padding: 0 14px 6px 0; }
table.rgrid { border-collapse: collapse; font-size: var(--fs-sm); }
table.rgrid th, table.rgrid td { padding: 4px 3px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.rgrid th.l, table.rgrid td.l { text-align: left; padding: 4px 10px 4px 14px; position: sticky; left: 0; z-index: 1; background: var(--panel); }
table.rgrid td.l b { margin-left: 8px; color: var(--text2); font-weight: 600; }
table.rgrid th span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); color: var(--dim); font-weight: 400; font-size: var(--fs-xs); }
table.rgrid td i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--line); vertical-align: middle; }
table.rgrid td i.on { background: var(--blue); cursor: help; }
.reps { display: flex; flex-direction: column; }
.rep { border-top: 1px solid var(--line); }
.rep:first-child { border-top: 0; }
.rh { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; list-style: none; }
.rh::-webkit-details-marker { display: none; }
details.rep > summary.rh::after { content: "▾"; margin-left: auto; color: var(--dim); }
details.rep[open] > summary.rh::after { content: "▴"; }
article.rep .rh { cursor: default; }
.rh .tag { margin: 0; }
.rpick { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.rph { font-weight: 600; font-size: var(--fs-sm); color: var(--text2); }
.rpi .tag { margin: 0; }
.rpi p { margin: 4px 0 0; color: var(--text2); line-height: 1.5; font-size: var(--fs-sm); }

/* 홈 '어제의 사무실'(static/office.js): 장면 canvas + 옆 패널 + 업무 일지 */
#h-office:empty { display: none; }
.ogrid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 10px; padding: 0 14px 10px; align-items: start; }
.ostage { min-width: 0; }
.oview { overflow-x: auto; border-radius: var(--r-md); background: #1c2438; overscroll-behavior-x: contain; }
.oview canvas { display: block; cursor: pointer; }
.obar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding-top: 8px; }
.obar #o-play { height: 28px; min-width: 56px; padding: 0 12px; border-radius: 8px; background: var(--chip); color: var(--text); font-size: var(--fs-xs); }
.oclock { margin-left: auto; color: var(--text); font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.opanel { display: grid; gap: 8px; align-content: start; min-height: 120px; background: var(--panel2); border-radius: var(--r-md); padding: 12px 14px; font-size: var(--fs-sm); }
.opanel h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-size: var(--fs-lg); }
.opanel p { margin: 0; color: var(--text2); line-height: 1.55; }
.opanel h3 i, .olog i, .olegend i, .ogh i { flex: 0 0 auto; display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.olast { color: var(--text) !important; font-weight: 600; }
.olegend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.olegend button { display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 8px; border-radius: 8px; background: var(--chip); color: var(--text2); font-size: var(--fs-xs); font-weight: 600; text-align: left; }
.omine { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.omine button, .olog button { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 5px 6px; border-radius: 6px; text-align: left; color: var(--text2); }
.omine button:hover, .olog button:hover, .olog button.on { background: var(--chip); }
.omine time, .olog time { flex: 0 0 auto; color: var(--dim); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.oact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.oact button { color: var(--muted); font-size: var(--fs-xs); }
.chain { display: flex; flex-wrap: wrap; gap: 4px; }
.ochain { display: grid; gap: 4px; }
/* 마지막 일 다시 보기: 단계 목록, 지금 단계 진하게 */
.oact button[data-rp] { color: var(--text); font-size: var(--fs-sm); font-weight: 700; background: var(--chip); padding: 4px 10px; border-radius: 6px; }
.orp { display: grid; gap: 6px; }
.orp b { color: var(--text); }
.orp ol { margin: 0; padding-left: 20px; display: grid; gap: 2px; color: var(--dim); }
.orp li[aria-current] { color: var(--text); font-weight: 700; }
.orp button { justify-self: start; color: var(--muted); font-size: var(--fs-xs); }
.ochain div { display: flex; flex-wrap: wrap; gap: 4px; }
.chain i, .ochain div i { padding: 1px 6px; border-radius: 5px; background: var(--chip); color: var(--text2); font-size: var(--fs-xs); font-style: normal; white-space: nowrap; }
.chain i + i::before, .ochain div i + i::before { content: "→ "; color: var(--dim); }
details.olog { padding: 0 14px 10px; }
details.olog summary { cursor: pointer; color: var(--muted); font-size: var(--fs-sm); padding: 4px 0; }
.olog ol { position: relative; max-height: 232px; overflow-y: auto; margin: 4px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 10px; }
.olog li.dim { padding: 5px 6px; font-size: var(--fs-xs); }
.olog b { flex: 0 0 auto; color: var(--text); font-size: var(--fs-sm); }
.olog i { align-self: center; }
.olog span { min-width: 0; font-size: var(--fs-sm); }
/* 데이터 점검 · 만든 방법 일곱 역할 */
table.grid.ichk td { vertical-align: top; }
table.grid.ichk details summary { cursor: pointer; color: var(--muted); font-size: var(--fs-xs); }
table.grid.ichk blockquote { margin: 6px 0 0; max-width: 420px; color: var(--text2); font-size: var(--fs-xs); line-height: 1.5; white-space: normal; }
.org { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; padding: 4px 14px 12px; }
.og { display: grid; align-content: start; gap: 6px; background: var(--panel2); border-radius: var(--r-md); padding: 12px 14px; font-size: var(--fs-sm); }
.ogh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.ogh b { color: var(--text); font-size: var(--fs-lg); }
.ogh .tag { margin: 0 0 0 auto; }
.og p { margin: 0; color: var(--muted); line-height: 1.55; }

/* 좁은 화면: 위 규칙을 덮어야 해서 파일 맨 끝에 둔다 */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pipe { flex-direction: column; align-items: stretch; }
  .pipe > .pa { align-self: center; margin: 0; height: 22px; transform: rotate(90deg); }
  .waf { grid-template-rows: repeat(20, auto); }
}
@media (max-width: 900px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  body.pub header.top { height: auto; flex-wrap: wrap; gap: 8px 14px; padding: 8px var(--s3); }
  body.pub .search { width: 100%; margin-left: 0; order: 3; }
  nav.menu { flex-wrap: wrap; }
  body.pub main { padding: var(--s1) var(--s2) var(--s4); }
  .tvheat { height: 420px; }
  .tvchart { height: 380px; }
  .tvhot { height: 400px; }
  .lbl, .kv.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fil { grid-template-columns: minmax(0, 1fr); }
  .stack, .sells { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .step + .step::before { display: none; }
  .step { padding: 10px 12px; }
  .step .big { font-size: 26px; }
  .nmcell { max-width: 150px; }
  .asof { padding: 4px calc(var(--s2) + 14px) 6px; }
  .cols, .cols.b, .hgrid { grid-template-columns: minmax(0, 1fr); }
  .hero2 { padding: 10px 6px 8px; }
  .hero2 h1 { font-size: 24px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card { min-height: 0; padding: 10px; }
  .card .ct b { font-size: 18px; }
  .kpis b { font-size: 17px; }
  .kpis { gap: 6px; }
  .kpis > div { padding: 8px; }
  .dca .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dca .kpis > div:first-child { grid-column: 1 / -1; }
  .dcain label { flex: 1 1 100%; }
  .dcain span { flex: 0 0 84px; }
  .dcain input { width: 100%; min-width: 0; }
  .cvplot svg { height: 200px; }
  .tm { height: 520px; }
  .bump .bl { display: none; }
  .r20s { grid-template-columns: minmax(0, 1fr); }
  .sig { grid-template-columns: 34px minmax(0, 1fr); }
  .sig .tks { grid-column: 1 / -1; }
  body.pub .phead { flex-wrap: wrap; }
  .whys.how { grid-template-columns: minmax(0, 1fr); }
  .cycle { flex-direction: column; align-items: stretch; gap: 6px; }
  .ca { align-self: center; transform: rotate(90deg); margin: 6px 0; }
}
@media (max-width: 600px) {
  .zn, .zone.db .zn { display: flex; flex-direction: column; align-items: stretch; }
  .zn .pa { align-self: center; height: 20px; transform: rotate(90deg); }
  .pn { flex: 0 0 auto; }
  .waf { grid-template-rows: repeat(25, auto); }
  .yv .lg, .yx .lg { display: none; }
  .yv .sm, .yx .sm { display: inline; }
  .yv.spx { display: none; }
  .yc, .yx { margin-left: 44px; }
  .dhist { gap: 3px; }
  .dhist .dn { font-size: 10px; }
  .hticks .c { display: none; }
  table.grid.tr8 th, table.grid.tr8 td { padding-left: 5px; padding-right: 5px; }
  table.grid.tr8 th, table.grid.tr8 td.l { white-space: normal; }
  table.grid.tr8 .tag { margin-left: 3px; }
  .hctl2 input[type=search] { flex: 1 1 120px; width: auto; }
}
@media (max-width: 900px) {
  .ogrid { grid-template-columns: minmax(0, 1fr); }
  .olog ol { grid-template-columns: minmax(0, 1fr); }
}
