/* 버틀러 요약 홈 (BHomeScr) 배치. v70 대시보드 개편 (S/plan/p14 Main 시안).
   제목 줄, 지표 칸, 상태 표시, 막대, 목록 줄, 알림 띠는 dash.css(dx-*)를 쓰고, 여기는 이 화면의 배치와 일정 타임라인만 정한다.
   색은 theme.css 토큰만: 틀은 흑백, 코랄 = 주의(마감 지남, 가까운 D-day, 손실, 초과), 파랑 = 오늘, 남색 = FIRE 막대. */

/* ---------- 다른 화면이 같이 쓰는 이름 (지우지 말 것) ----------
   bhm-h, bhm-tag, bhm-more: 투자 홈의 칸 머리(invhome.js IhH, IhMore). */
.bhm-h{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:10px;border-bottom:2px solid var(--ink)}
.bhm-h h2{margin:0;font-size:15px;font-weight:900;letter-spacing:-.02em;display:flex;align-items:center;gap:8px;line-height:1.4}
.bhm-tag{font-size:11px;font-weight:700;color:var(--ink-2);border:1px solid var(--line);border-radius:7px;padding:1px 7px;letter-spacing:0}
.bhm-more{display:inline-flex;align-items:center;gap:2px;border:0;background:none;padding:2px 0;font:inherit;font-size:12.5px;font-weight:500;color:var(--ink-3);cursor:pointer;white-space:nowrap}
.bhm-more .ico{color:var(--ink-3)}

/* ---------- 화면 틀 ---------- */
.bhm{display:flex;flex-direction:column;gap:16px;min-width:0;word-break:keep-all;overflow-wrap:break-word}
/* 머리: 왼쪽 날짜와 반영 시점, 오른쪽 확인 필요 띠 */
.bhm>.phead.bhm-head{display:flex;align-items:center;justify-content:space-between;gap:12px 20px;flex-wrap:wrap}
.bhm-ttl{min-width:0}
.bhm-head h1{margin:0}
.bhm-sub{margin:4px 0 0;font-size:13px;color:var(--ink-2);line-height:1.5}
.bhm-flag.dx-flag{width:auto;flex:none;gap:4px 12px;padding:9px 12px 9px 14px;min-height:42px;flex-wrap:nowrap}
.bhm-flag b{white-space:nowrap}
.bhm-flag .dx-s{white-space:nowrap}
.bhm-flag .ico{flex:none;color:var(--ink-3);margin-left:2px}
.bhm-flag:hover{border-color:var(--ink-4)}

/* 말로 부탁하기 입력 (BButler): 입력 줄과 확인 카드만 남기고 AI 요약, 확인 필요 띠, 머리는 숨김 */
.bhm-ask>.bb{gap:10px}
.bhm-ask>.bb>.bc-h,.bhm-ask>.bb>.bb-sub,.bhm-ask>.bb>.bb-box,.bhm-ask>.bb>.bb-chk{display:none}
.bhm-ask>.bb:not(:has(>.bb-ask,>.bb-busy,>.bb-cf,>.bb-say)){display:none}
.bhm-ask .bb-ask{min-height:46px;padding:0 5px 0 14px}
.bhm-ask .bb-ask input{height:42px!important;font-size:14px}
.bhm-ask .bb-ask .go{width:36px;height:36px}
/* 보내기 버튼 화살표: butler.css의 .bb-ask .ico 규칙이 검은 버튼 안 화살표까지 검게 칠함. 이 화면에서만 바로잡음 */
.bhm-ask .bb-ask .go:not(:disabled) .ico{color:var(--surface)}
.bhm:has(.bhm-ask>.bb:not(:has(>.bb-ask,>.bb-busy,>.bb-cf,>.bb-say))) .bhm-ask{display:none}

/* 두 칸: 휴대폰과 태블릿은 한 줄, PC(1100 이상)는 7:5 */
.bhm-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:36px;align-items:start;margin-top:8px}
.bhm-col{display:flex;flex-direction:column;gap:36px;min-width:0}
.bhm-sec{min-width:0}
.bhm-sec>.dx-empty{margin:0}
.bhm-nw{white-space:nowrap}
.bhm-dim.dx-v{font-size:18px;font-weight:800;color:var(--ink-4);line-height:1.45}

/* ---------- 앞으로 7일: 날짜 | 레일과 점 | 그날 일정과 할 일 ---------- */
.bh7{--bh7-dl:56px;--bh7-rl:16px;--bh7-tmw:96px;display:flex;flex-direction:column}
.bh7-kl{display:flex;flex-wrap:wrap;gap:6px 14px;padding:12px 0 4px;font-size:12.5px;font-weight:700;color:var(--ink-2)}
.bh7-kl>span{display:inline-flex;align-items:center;gap:5px}
.bh7-kl .bbd{width:16px;height:16px;font-size:9.5px}
.bh7-day{display:grid;grid-template-columns:var(--bh7-dl) var(--bh7-rl) minmax(0,1fr);column-gap:12px}
.bh7-dl{display:flex;flex-direction:column;align-items:flex-end;padding-top:15px;text-align:right;min-width:0}
.bh7-dl b{font-size:20px;line-height:22px;font-weight:900;letter-spacing:-.02em}
.bh7-dl small{margin-top:2px;font-size:12px;font-weight:700;color:var(--ink-3);white-space:nowrap;line-height:1.35}
.bh7-day.today .bh7-dl b,.bh7-day.today .bh7-dl small{color:var(--c-blue)}
.bh7-rail{position:relative;display:flex;justify-content:center}
.bh7-rail::before{content:"";position:absolute;top:0;bottom:0;left:50%;width:2px;margin-left:-1px;background:var(--line)}
.bh7-day:first-child .bh7-rail::before{top:26px}
.bh7-day:last-child .bh7-rail::before{bottom:auto;height:26px}
.bh7-rail i{position:relative;margin-top:21px;width:10px;height:10px;border-radius:50%;background:var(--surface);border:2px solid var(--ink);box-sizing:border-box}
.bh7-day.today .bh7-rail i{border-color:var(--c-blue);background:var(--c-blue)}
.bh7-evs{display:flex;flex-direction:column;min-width:0;padding:4px 0 8px;border-bottom:1px solid var(--line-2)}
.bh7-day:last-child .bh7-evs{border-bottom:0}
.bh7-none{margin:0;padding:15px 0 7px;font-size:13px;color:var(--ink-3)}
.bh7-none.sub{padding-top:2px}
/* 공휴일: 그날 맨 위 한 줄 (시각 칸에 공휴일, 제목 칸에 이름) */
.bh7-hol{display:grid;grid-template-columns:var(--bh7-tmw) minmax(0,1fr);column-gap:44px;align-items:center;min-height:36px;padding:7px 0 3px}
.bh7-hol>b{font-size:13.5px;font-weight:600;color:var(--c-coral-ink)}
.bh7-hol .bh7-tm{color:var(--ink-3)}

/* 한 줄: 시각 | 유형 배지 | 제목과 사람 | 일정/할 일 */
.bh7-ev{display:grid;grid-template-columns:var(--bh7-tmw) 20px minmax(0,1fr) auto;column-gap:12px;align-items:center;width:100%;min-height:44px;padding:7px 0;border:0;background:none;font:inherit;color:var(--ink);text-align:left;cursor:pointer;border-radius:0}
.bh7-ev:hover .bh7-t b{text-decoration:underline;text-underline-offset:3px}
.bh7-tm{font-size:13px;font-weight:700;color:var(--ink-2);font-variant-numeric:tabular-nums;white-space:nowrap;line-height:1.35}
.bh7-tm .e::before{content:" ~ "}
.bh7-ev.cont .bh7-t b{font-weight:600;color:var(--ink-2)}
.bh7-dl .td>i{font-style:normal}
.bh7-tm.late{color:var(--c-coral-ink)}
.bh7-t{display:flex;flex-direction:column;gap:1px;min-width:0}
.bh7-t b{font-size:14.5px;font-weight:700;line-height:1.4}
.bh7-t small{display:flex;align-items:center;gap:5px;min-width:0;font-size:12.5px;color:var(--ink-3);line-height:1.45}
.bh7-t small>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bh7-dot{flex:none;width:7px;height:7px;border-radius:50%;display:inline-block}
.bh7-tag{justify-self:end;font-size:12px;font-weight:800;line-height:1.4;border:1px solid var(--line);border-radius:999px;padding:1px 8px;color:var(--ink-2);white-space:nowrap}
.bh7-tag.todo{border-color:var(--ink);color:var(--ink)}

/* 오늘 습관 한 줄 (habit.js BHabitLine): 제목을 일정 제목 줄에 맞춤 */
.bh7-evs>.bhm-g{border-top:1px dashed var(--line);margin-top:2px}
.bh7-evs .hb-line{display:grid;grid-template-columns:var(--bh7-tmw) 20px minmax(0,1fr) auto auto;column-gap:12px;align-items:center;width:100%;min-height:44px!important;padding:7px 0;border:0;background:none;font:inherit;color:var(--ink);text-align:left;cursor:pointer}
.bh7-evs .hb-line .bhm-tm{grid-column:1;font-size:13px;font-weight:700;color:var(--ink-2)}
.bh7-evs .hb-line .bhm-t{grid-column:3;display:flex;flex-direction:column;gap:1px;min-width:0}
.bh7-evs .hb-line .bhm-t b{font-size:14.5px;font-weight:700;line-height:1.4}
.bh7-evs .hb-line .bhm-t small{display:flex;align-items:center;gap:5px;font-size:12.5px;color:var(--ink-3);line-height:1.45;flex-wrap:wrap}
.bh7-evs .hb-line .bhm-dot{flex:none;width:7px;height:7px;border-radius:50%;display:inline-block}
.bh7-evs .hb-line>.ico{justify-self:end}

/* ---------- D-day ---------- */
.bhd-row{display:grid;grid-template-columns:60px minmax(0,1fr) auto;column-gap:14px;align-items:center;width:100%;min-height:54px;padding:10px 0;border:0;border-bottom:1px solid var(--line-2);background:none;font:inherit;color:var(--ink);text-align:left;cursor:pointer}
.bhd-row:last-child{border-bottom:0}
.bhd-row:hover .bhd-t b{text-decoration:underline;text-underline-offset:3px}
.bhd-n{font-size:17px;font-weight:900;letter-spacing:-.02em;white-space:nowrap}
.bhd-n.soon{color:var(--c-coral-ink)}
.bhd-t{display:flex;flex-direction:column;gap:1px;min-width:0}
.bhd-t b{font-size:14.5px;font-weight:700;line-height:1.4}
.bhd-t small{font-size:12.5px;color:var(--ink-3);line-height:1.45;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bhd-d{font-size:12.5px;font-weight:700;color:var(--ink-2);white-space:nowrap}

/* ---------- 장부: 지표 네 칸 아래 예산 진행 ---------- */
.bhm-bud{display:flex;flex-direction:column;gap:9px;padding:16px 0;border-bottom:1px solid var(--line-2)}
.bhm-bud-h{display:flex;align-items:center;justify-content:space-between;gap:10px}
.bhm-bud-h>b{font-size:14px;font-weight:800}
.bhm-bud .dx-bar{margin:3px 0 1px}
.bhm-bud-l{display:flex;justify-content:space-between;align-items:baseline;gap:2px 14px;flex-wrap:wrap;font-size:12.5px;color:var(--ink-3);line-height:1.5}
.bhm-bud-l b{color:var(--ink);font-weight:800;font-variant-numeric:tabular-nums}
.bhm-bud-l b.dx-neg{color:var(--c-coral-ink)}
.bhm-bud .dx-note .lnk{margin-left:2px}

/* ---------- 투자: 지표 네 칸 아래 이번 달 수익률, 스트레스, FIRE ---------- */
.dx-kc .dx-s.sm{margin-top:-3px}
.bhm-ir.dx-row{padding:14px 0;align-items:center}
.bhm-ir-t{display:flex;flex-direction:column;gap:2px;min-width:0}
.bhm-ir-t b{font-size:14px;font-weight:800;line-height:1.4}
.bhm-ir-t small{font-size:12.5px;color:var(--ink-3);line-height:1.45}
.bhm-ir-v{display:flex;flex-direction:column;align-items:flex-end;gap:1px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink)}
.bhm-ir-v b{font-size:20px;font-weight:900;letter-spacing:-.02em;line-height:1.2}
.bhm-ir-v small{font-size:12.5px;font-weight:700;line-height:1.3}
/* choi.css가 .neg를 검정으로 고정하므로 dx-neg를 쓴다 */
.bhm-ir-v.dx-neg{color:var(--c-coral-ink)}
.bhm-ir-v.dim b{font-size:14px;font-weight:700;color:var(--ink-4)}
.bhm-fire{display:flex;flex-direction:column;gap:8px;width:100%;padding:14px 0;border:0;border-bottom:1px solid var(--line-2);background:none;font:inherit;color:var(--ink);text-align:left;cursor:pointer}
.bhm-fire:hover .bhm-fire-h>b:first-child{text-decoration:underline;text-underline-offset:3px}
.bhm-fire-h{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.bhm-fire-h>b:first-child{font-size:14px;font-weight:800;line-height:1.4}
.bhm-fire-h>b:last-child{font-size:20px;font-weight:900;letter-spacing:-.02em;line-height:1.2}
.bhm-fire .dx-bar{display:block}
.bhm-fire-l{display:flex;justify-content:space-between;gap:2px 14px;flex-wrap:wrap;font-size:12.5px;color:var(--ink-3);line-height:1.5}
.bhm-fire-l b{color:var(--ink);font-weight:800;font-variant-numeric:tabular-nums}
.bhm-pxn{margin-top:10px}

/* ---------- PC: 두 칸 ---------- */
@media (min-width:1100px){
  .bhm-grid{grid-template-columns:minmax(0,7fr) minmax(0,5fr);column-gap:48px;margin-top:10px}
  .bhm-col{gap:40px}
}
/* ---------- 휴대폰과 태블릿: 머리 아래로 확인 필요 띠가 한 줄 ---------- */
@media (max-width:1099px){
  main.content .bhm>.phead.bhm-head{display:flex;flex-direction:column;align-items:stretch;gap:12px}
  .bhm-flag.dx-flag{width:100%;justify-content:flex-start}
  .bhm-flag .dx-s{flex:1;min-width:0;white-space:normal}
}
/* ---------- 휴대폰: 타임라인을 좁게, 시각은 두 줄 ---------- */
@media (max-width:767px){
  .bhm{gap:14px}
  .bhm-grid,.bhm-col{gap:32px}
  .bhm .dx-sh .dx-more{min-height:34px}
  .bh7{--bh7-dl:34px;--bh7-rl:12px;--bh7-tmw:50px}
  .bh7-day{column-gap:8px}
  .bh7-dl b{font-size:18px}
  .bh7-dl small{font-size:12px}
  /* 본문 12.5px 이상: dash.css의 휴대폰 12px 보조 글을 이 화면에서만 키움 */
  .bhm .dx-s{font-size:12.5px}
  .bh7-dl .td{display:block}
  .bh7-dl .td>i{display:none}
  .bh7-ev,.bh7-evs .hb-line{column-gap:10px}
  .bh7-hol{column-gap:40px}
  /* 사람 줄은 두 줄까지 (기간 끝 날짜가 잘리지 않게) */
  .bh7-t small{align-items:flex-start}
  .bh7-t small>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal}
  .bh7-t small>.bh7-dot{margin-top:5.5px}
  .bhd-t small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal}
  .bh7-tm{font-size:12.5px;white-space:normal}
  .bh7-tm>span{display:block}
  .bh7-tm .e{color:var(--ink-3)}
  .bh7-tm .e::before{content:"~ "}
  .bh7-evs .hb-line .bhm-tm{font-size:12.5px}
  .bh7-t b,.bhd-t b,.bh7-evs .hb-line .bhm-t b{font-size:14px}
  .bhd-row{grid-template-columns:50px minmax(0,1fr) auto;column-gap:10px}
  .bhd-n{font-size:16px}
  .bhm-ir-v b,.bhm-fire-h>b:last-child{font-size:19px}
}
.bh-nw{white-space:nowrap}
/* v72: 제목 옆 ⓘ */
.bhm-bt{display:inline-flex;align-items:center;gap:6px}
.bhm-ir-t>b{display:inline-flex;align-items:center;gap:6px}
