/* ══════════════════════════════════════════════════════════════════════
   마추 모바일 '전부 초록' 2단계 — 프로필 담당 덮어쓰기 (2026-09-15 대표 요청)
   rb.css/m3/green-profile.css

   · 범위: 말·기수·조교사 상세(horse/jockey/trainer) · 내 기록(my) · 설정(settings) ·
     파트너 대시보드(partner) · 정품 인증(v). 게스트 화면은 이미 0건 → 대부분 로그인/상태별 화면.
   · lib/jtm.ui.lib.php 가 jtm-m3.css 뒤에 green-*.css 를 이름순으로 싣는다.
   · 파일 전체가 @media (max-width: 900px) 한 덩어리 → PC(≥901px) 무변경.
   · 본문 <style> 이 뒤에 나오므로 'html body ' 로 명시도를 올리고, style="" 속성 색만 !important.
   · 페이지 전용 클래스(.my-row · .jt2-lead · .jt2-buy-p · .pt-* · .jt-grid--hist · .jt-minigrid)
     또는 그 페이지에만 있는 인라인 색 문자열로 좁혀 다른 화면에 번지지 않게 한다.
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {

/* ── 1. 상세 3종 착순 태그(jtm_dp_ord_badge) — 출주·기승 이력 표 ──
   셸 토큰으로 1착(amber)이 회색이 되어 4착 이하(회색)와 같아 보이고 2~3착(초록)보다 약해졌다.
   착순 금은동 → 1착 진초록 채움 · 2~3착 연초록(글자 대비 4.5 이상) · 4착 이하 회색(그대로). */
html body .jt-grid--hist .jt-tag--amber { background: #0E7C4C; color: #FFFFFF; }
html body .jt-grid--hist .jt-tag--ok    { background: #E8F6EF; color: #17794A; }
html body.jt-dark .jt-grid--hist .jt-tag--amber { background: #3FC482; color: #0D1320; }
html body.jt-dark .jt-grid--hist .jt-tag--ok    { background: #143325; color: #7FD9A8; }

/* 기수 최근 60일 폼 미니 타일 '1착' 수(style="color:var(--jt-amber)") — 금색 → 짙은 초록 */
html body .jt-minigrid .v[style*="--jt-amber"] { color: #0B5E3A !important; }
html body.jt-dark .jt-minigrid .v[style*="--jt-amber"] { color: #9BE3BC !important; }

/* ── 2. 내 기록(my.php · 회원) ── */
/* 결과 배지: 단승 적중 > 연승 적중 > 미적중 > 예정/집계 중 (구분 유지) */
html body .my-row i.ok   { background: #E8F6EF; color: #0E7C4C; }
html body .my-row i.ok2  { background: #F2FAF5; color: #17794A; box-shadow: inset 0 0 0 1px #BFE5D1; }
html body .my-row i.wait { background: #F1F4F9; color: #5A6A82; box-shadow: inset 0 0 0 1px #CBD5E1; }
html body.jt-dark .my-row i.ok   { background: #143325; color: #7FD9A8; }
html body.jt-dark .my-row i.ok2  { background: #10281C; color: #52D190; box-shadow: inset 0 0 0 1px #245C40; }
html body.jt-dark .my-row i.no   { background: #202A3C; color: #8B98AC; }
html body.jt-dark .my-row i.wait { background: #202A3C; color: #A7B4C9; box-shadow: inset 0 0 0 1px #3A4760; }
/* 결과 난 경주의 1픽 번호 — 흰 글자 대비(#22A45D 2.9:1) → 진초록 채움 */
html body .my-row .pk b { background: #0E7C4C; color: #FFFFFF; }
html body.jt-dark .my-row .pk b { background: #3FC482; color: #0D1320; }
/* 다크 대비 — 주간 리포트 큰 숫자 · '전체 보기 ›' 인라인 초록(#17794A) 링크 */
html body.jt-dark .my-rep b { color: #7FD9A8; }
html body.jt-dark .jt2-card-head a.d[style*="#17794A"] { color: #7FD9A8 !important; }
html body.jt-dark .my-pp .hs i b { background: #3FC482; color: #0D1320; }

/* ── 3. 설정(settings.php · 회원) ── */
/* 출발임박 알림 시점 칩 — 선택 파랑 채움 → 진초록 채움 (미선택 테두리형은 그대로) */
html body .jt2-leadrow .jt2-lead[aria-pressed="true"] { background: #0E7C4C; border-color: #0E7C4C; color: #FFFFFF; }
html body.jt-dark .jt2-leadrow .jt2-lead[aria-pressed="true"] { background: #3FC482; border-color: #3FC482; color: #0D1320; }
/* 구매 내역 차감 포인트 빨강 → 잉크 굵은 글자 */
html body .jt2-buyrow .jt2-buy-p { color: #0F2E20; }
html body.jt-dark .jt2-buyrow .jt2-buy-p { color: #E8F2EC; }

/* ── 4. 파트너 대시보드(partner.php · 파트너 회원) ── */
html body .pt-codebox .code { color: #17794A; }
html body .pt-linkbox button { background: #0E7C4C; color: #FFFFFF; }
html body .pt-linkbox button:active { background: #0B6B41; }
html body .pt-months .f { color: #17794A; }
html body .pt-agrow .cd { color: #17794A; }
html body.jt-dark .pt-codebox .code,
html body.jt-dark .pt-months .f,
html body.jt-dark .pt-agrow .cd { color: #7FD9A8; }
html body.jt-dark .pt-linkbox button { background: #3FC482; color: #0D1320; }
html body.jt-dark .pt-linkbox button:active { background: #52D190; }
/* KPI 인라인 색 — 이번 달 수수료(파랑) → 초록 글자 · 미지급>0(빨강) → 잉크 */
html body .jt2-section > .jt2-kpis .jt2-kpi .v[style*="#1D4ED8"] { color: #17794A !important; }
html body .jt2-section > .jt2-kpis .jt2-kpi .v[style*="#D62B2B"] { color: #0F2E20 !important; }
html body.jt-dark .jt2-section > .jt2-kpis .jt2-kpi .v[style*="#1D4ED8"] { color: #7FD9A8 !important; }
html body.jt-dark .jt2-section > .jt2-kpis .jt2-kpi .v[style*="#D62B2B"] { color: #E8F2EC !important; }
/* 총판 고정 관리비(주황 금액) → 짙은 초록 */
html body .jt2-section .jt2-card-body > b.jt2-num[style*="#B45309"] { color: #0B5E3A !important; }
html body.jt-dark .jt2-section .jt2-card-body > b.jt2-num[style*="#B45309"] { color: #9BE3BC !important; }

/* ── 5. 마추픽 정품 인증(v.php) — 4개 판정 상태 (인라인 style 색) ──
   정품(초록) 유지 · 도용(빨강)·위조(주황) → 잉크 테두리·굵은 잉크 제목, 상자는 도용 연초록 / 위조 회색 ·
   코드 없음(회색) 유지. 이모지 글리프는 emoji 담당. */
/* 정품 — 작은 발급 정보 글자 대비(#0E8A46 on #E6F7EE 4.0) 보강 */
html body .jt2-col > .jt2-card[style*="border-color:#0E8A46"] > div[style*="background:#E6F7EE"] { color: #0E7C4C !important; }
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#0E8A46"] { border-color: #3FC482 !important; }
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#0E8A46"] > div[style*="font-size:22px"] { color: #3FC482 !important; }
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#0E8A46"] > div[style*="background:#E6F7EE"] { background: #143325 !important; color: #7FD9A8 !important; }
/* 도용(만료 QR) */
html body .jt2-col > .jt2-card[style*="border-color:#C22F3D"] { border-color: #0F2E20 !important; }
html body .jt2-col > .jt2-card[style*="border-color:#C22F3D"] > div[style*="font-size:22px"] { color: #0F2E20 !important; }
html body .jt2-col > .jt2-card[style*="border-color:#C22F3D"] > div[style*="background:#FDECEC"] { background: #E8F6EF !important; color: #0F2E20 !important; box-shadow: inset 0 0 0 1px #BFE5D1; }
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#C22F3D"] { border-color: #E8F2EC !important; }
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#C22F3D"] > div[style*="font-size:22px"] { color: #E8F2EC !important; }
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#C22F3D"] > div[style*="background:#FDECEC"] { background: #143325 !important; color: #E8F2EC !important; box-shadow: inset 0 0 0 1px #1D3A2B; }
/* 위조(서명 불일치) */
html body .jt2-col > .jt2-card[style*="border-color:#B45309"] { border-color: #0F2E20 !important; }
html body .jt2-col > .jt2-card[style*="border-color:#B45309"] > div[style*="font-size:22px"] { color: #0F2E20 !important; }
html body .jt2-col > .jt2-card[style*="border-color:#B45309"] > div[style*="background:#FFF4E0"] { background: #F1F4F9 !important; color: #0F2E20 !important; box-shadow: inset 0 0 0 1px #CBD5E1; }
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#B45309"] { border-color: #E8F2EC !important; }
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#B45309"] > div[style*="font-size:22px"] { color: #E8F2EC !important; }
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#B45309"] > div[style*="background:#FFF4E0"] { background: #202A3C !important; color: #E8F2EC !important; box-shadow: inset 0 0 0 1px #3A4760; }
/* 판정 이모지 실루엣 색 — emoji 담당 .m3-emo(글자 채움 투명 + currentColor 그림자)가 카드 기본 글자색(남색)을 받아
   정품 ✅ 까지 짙은 사각형으로 보인다. 색만 판정별로 맞춘다(글리프·단색 처리 방식은 emoji 담당 그대로). */
html body .jt2-col > .jt2-card[style*="border-color:#0E8A46"] > .m3-emo { color: #0E7C4C; }
html body .jt2-col > .jt2-card[style*="border-color:#C22F3D"] > .m3-emo,
html body .jt2-col > .jt2-card[style*="border-color:#B45309"] > .m3-emo { color: #0F2E20; }
html body .jt2-col > .jt2-card[style*="border-color:#5A6A82"] > .m3-emo { color: #5A6A82; }
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#0E8A46"] > .m3-emo { color: #3FC482; }
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#C22F3D"] > .m3-emo,
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#B45309"] > .m3-emo { color: #E8F2EC; }
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#5A6A82"] > .m3-emo { color: #A7B4C9; }
/* 코드 없음 — 회색 유지, 다크 대비만 */
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#5A6A82"] > div[style*="font-size:22px"] { color: #A7B4C9 !important; }
html body.jt-dark .jt2-col > .jt2-card[style*="border-color:#5A6A82"] > div[style*="background:#F1F4F9"] { background: #202A3C !important; color: #A7B4C9 !important; }

/* ══════════════ 3단계 (2026-09-15 · m3g3-profile) ══════════════ */

/* ── 6. 다크 — 구 토큰 별칭(--jt-*)을 body 에서 다시 잇는다 ──
   jt2.css 는 :root 에서 --jt-text: var(--jt2-text) 처럼 구 별칭을 만든다. var() 는 선언된 요소(:root)에서
   계산이 끝나 '밝은 값'이 그대로 내려오고, body.jt-dark 가 --jt2-* 만 바꾸므로 다크에서도 안 바뀐다.
   → horse/jockey/trainer(+ ?modal=1 조각 .jt-modal-frag)의 인라인 style="color:var(--jt-text)"
     (통산 승률 값 · 콤비 마필/관리마 TOP5 마명·% · 최근 기승/출주 표 마명 · 조교사·부마·모마 링크)가
     남색 #0E1B2C 로 다크 바탕에 묻혔다. 같은 원인: --jt-text-2/-sub/-mute/-dim · --jt-panel-3/-border-2
     (기수·조교사 사진 틀이 밝은 회색 #F1F4F9) · race.php '전 N'(--jt-text-dim) · stats.php 0 값(--jt-text-mute).
   body 에서 같은 식으로 다시 선언하면 body.jt-dark 의 --jt2-* 로 계산되어 인라인 var() 와
   이 토큰을 쓰는 클래스 규칙이 모두 제 다크 값이 된다(!important 불필요 · 인라인 선택자 불필요).
   green.css 가 이미 잇는 별칭(--jt-amber·-red·-up·-up-bg·-ok·-green·-busan·-ycheon·-hover)은 건드리지 않는다.
   밝은 모드는 :root 값과 body 값이 같아 무변경이라 다크에만 둔다.
   대비(카드 #161E2C 기준): text #E8EEF7 15.6 · text-2/sub #A7B4C9 8.6 · mute #8594A9 5.4 ·
   dim 은 --jt2-faint(#5F6D86 3.2:1, 16px '/N' 에 부족) 대신 --jt2-mute 로 잇는다(5.4:1). */
html body.jt-dark {
  --jt-bg:        var(--jt2-bg);
  --jt-panel:     var(--jt2-card);
  --jt-panel-2:   var(--jt2-inset);
  --jt-panel-3:   var(--jt2-tint-grey);
  --jt-row-dim:   var(--jt2-inset);
  --jt-border:    var(--jt2-line);
  --jt-border-2:  var(--jt2-line-soft);
  --jt-hairline:  var(--jt2-hairline-2);
  --jt-text:      var(--jt2-text);
  --jt-text-2:    var(--jt2-text-2);
  --jt-text-sub:  var(--jt2-text-2);
  --jt-text-mute: var(--jt2-mute);
  --jt-text-dim:  var(--jt2-mute);
  --jt-down:      var(--jt2-pri);
  --jt-down-bg:   var(--jt2-tint-blue);
  --jt-ok-bg:     var(--jt2-tint-green);
  --jt-seoul:     var(--jt2-seoul);
  --jt-jeju:      var(--jt2-jeju);
  --jt-shadow-sm: var(--jt2-sh-card);
  --jt-shadow:    var(--jt2-sh-drop);
  --jt-shadow-lg: var(--jt2-sh-drop);
}

/* ── 7. 상세 3종 머리 오른쪽 — '통산 승률 N%' 값이 '← 홈' 버튼에 바짝 붙음 ──
   jtm_page_head 의 .right 안에 span 과 a.jt-btn 이 공백 없이 이어져 출력된다 → 버튼 앞에만 간격. */
html body .jt-pagehead .right > span + .jt-btn { margin-left: 12px; }

/* ── 8. 경주마 기본 정보 — 태그 칩 줄이 '출주' KPI 카드 윗선에 붙음 (3단계 2차 검수) ──
   horse.php 는 태그 줄(div style="display:flex;gap:5px;flex-wrap:wrap")이 .jt-card-body 바로 아래에 있고
   jt2.css 의 .jt-kpis 에는 margin-top 이 없어 간격 0. 기수·조교사는 사진+태그 감싸개가 margin-bottom:16px 이라
   같은 16px 을 준다. 감싸개(align-items:center) 구조인 기수·조교사에는 걸리지 않는다(.jt-modal-frag 조각 포함). */
html body .jt-card-body > div[style*="flex-wrap:wrap"] + .jt-kpis { margin-top: 16px; }

} /* @media (max-width: 900px) */
