/* 말파고 라이브 — /malpago/live (시안 v7 보드 F, 2026-11-13).
   한 화면: 머리 ‹ 경주 › · 탭 '지금 · 오늘 일정' · 카드(밤 = AI 예상이 있는 주인공, 낮 = 출전마·결과·일정).
   토큰은 앱 docs/LIVE_RACE_WIDGET.md "디자인 토큰": ink #17243A · cobalt #3157A4 · ice #D8E4FA · tint #EFF3FB,
   밤 카드 #17243A/#24375A, 글자 #F3F6FB/#AEBBD0, 신호 밤 #FFB547 · 낮 #8A5A00. 민트·청록 없음.
   마번 칩은 공식 번호색, 숫자 항상 표기. 숫자는 고정폭. 누르는 것은 44px(작은 알약은 ::after 로 범위를 넓힌다). */
.mp-live .mp-page { max-width: 560px; padding-left: 12px; padding-right: 12px; padding-top: 10px; }
.mp-embed.mp-live .mp-page { padding-top: 8px; }

.lv {
  --lv-ink: #17243A; --lv-cobalt: #3157A4; --lv-ice: #D8E4FA; --lv-tint: #EFF3FB; --lv-outline: #B8C3D6;
  --lv-muted: #596579; --lv-action: #244583; --lv-signal: #8A5A00;
  color: var(--lv-ink); font-variant-numeric: tabular-nums; word-break: keep-all; font-size: 12.5px;
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.lv [hidden] { display: none !important; }
.lv .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.lv button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lv .num { font-variant-numeric: tabular-nums; }

/* 머리 ‹ 경주 › — 아래 줄을 누르면 자동 따라가기 ↔ 이 경주 고정 */
.lv-head { display: flex; align-items: center; gap: 4px; min-height: 48px; }
.lv-nav { flex: none; width: 44px; height: 44px; border-radius: 12px; font-size: 26px; font-weight: 900; color: var(--lv-muted); line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.lv-nav:hover { background: #E3E8F1; }
.lv-nav:disabled { opacity: .3; cursor: default; background: none; }
.lv-title { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.lv-title b { font-size: 16px; font-weight: 900; line-height: 1.25; }
.lv-title b.is-cancelled { text-decoration: line-through; color: var(--lv-muted); }
.lv .lv-follow { position: relative; font-size: 11px; font-weight: 800; color: var(--lv-signal); line-height: 1.5; padding: 0 10px; }
.lv-follow::after { content: ''; position: absolute; inset: -10px -6px -14px; }
.lv .lv-follow:disabled { color: var(--lv-muted); font-weight: 500; cursor: default; }

/* 탭 줄: 지금 · 오늘 일정 | 경마장 · 승식 */
.lv-tabs { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.lv-tabs::-webkit-scrollbar { display: none; }
.lv-tabs-l, .lv-tabs-r { display: flex; gap: 4px; flex: none; }
.lv-tabs-r { margin-left: auto; }
.lv .lv-tab, .lv .lv-opt-pill { position: relative; min-height: 36px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #E6ECF7; color: var(--lv-muted); white-space: nowrap; }
.lv-tab::after, .lv-opt-pill::after { content: ''; position: absolute; inset: -4px 0; }
.lv .lv-tab[aria-selected="true"] { background: var(--lv-action); color: #fff; }
.lv .lv-opt-pill[aria-pressed="false"] { opacity: .55; }

/* 카드 */
.lv-now, .lv-sched { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lv-k { background: var(--card); color: var(--tx); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.lv-day { --card: #FFFFFF; --raised: #E6ECF7; --tx: #17243A; --sub: #596579; --ice: #244583; --sig: #8A5A00; --line: rgba(23, 36, 58, .13); --pill: #DCE4F4;
  --up: #C62828; --dn: #1F5FBF; --sigbg: rgba(138, 90, 0, .09); --sigln: rgba(138, 90, 0, .5); --btn: #244583; --btntx: #FFFFFF; box-shadow: 0 1px 0 rgba(23, 36, 58, .06); }
.lv-night { --card: #17243A; --raised: #24375A; --tx: #F3F6FB; --sub: #AEBBD0; --ice: #D8E4FA; --sig: #FFB547; --line: rgba(216, 228, 250, .15); --pill: #30476B;
  --up: #FF8A80; --dn: #8FB8FF; --sigbg: rgba(255, 181, 71, .12); --sigln: rgba(255, 181, 71, .55); --btn: #D8E4FA; --btntx: #17243A; }
.lv-k a { color: inherit; }
.lv-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.lv-t { font-size: 19px; font-weight: 900; line-height: 1.2; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.lv-t.is-small { font-size: 15px; }
.lv-t .is-cancelled { text-decoration: line-through; color: var(--sub); }
.lv-tm { font-size: 11.5px; font-weight: 700; color: var(--ice); text-align: right; line-height: 1.4; white-space: nowrap; flex: none; }
.lv-tm b { font-size: 14px; }
.lv-tm b.is-soon { color: var(--sig); }
.lv-sub { font-size: 11px; color: var(--sub); line-height: 1.5; }
.lv-tag { font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--pill); color: var(--ice); white-space: nowrap; line-height: 1.6; }
.lv-tag.is-sig { background: var(--sigbg); color: var(--sig); }
.lv-ln { font-size: 11.5px; line-height: 1.5; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.lv-k0 { color: var(--sub); font-weight: 700; min-width: 52px; font-size: 11px; }
.lv-r { margin-left: auto; color: var(--sub); font-size: 11px; }
.lv-u { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.lv-ttl { font-size: 13.5px; font-weight: 900; margin-right: 4px; }
.lv-dv0 { height: 1px; background: var(--line); margin: 1px 0; }
.lv-empty { font-size: 12.5px; color: var(--sub); line-height: 1.6; padding: 2px 0; }
.lv-link { font-weight: 700; color: var(--ice) !important; text-decoration: underline; text-underline-offset: 3px; }
.lv-up { color: var(--up); font-weight: 800; }
.lv-dn { color: var(--dn); font-weight: 800; }

/* AI 예상 상자 · 잠금 한 줄 */
.lv-ai { background: var(--raised); border-radius: 12px; padding: 9px 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lv-ai.is-compact { padding: 7px 9px; }
.lv-ai-lb { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: var(--sub); }
.lv-ai-cf { margin-left: auto; color: var(--tx); font-size: 11.5px; }
.lv-pk { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lv-pk .lv-nm { font-size: 17px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; margin-right: auto; }
.lv-pk.is-small .lv-nm { font-size: 14px; }
.lv-pk-rest { display: flex; gap: 6px; flex: none; }
.lv-pk .lv-k0 { min-width: 0; }
.lv-chg { border-radius: 8px; padding: 5px 9px; box-shadow: inset 0 0 0 1px var(--sigln); background: var(--sigbg); font-size: 11px; line-height: 1.6; color: var(--sig); font-weight: 700; }
.lv-chg-rows { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; vertical-align: middle; }
.lv-lockbox { font-size: 12.5px; font-weight: 800; color: var(--ice); background: var(--raised); padding: 10px 12px; border-radius: 10px; line-height: 1.4; }
.lv-k .lv-cta { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 22px; background: var(--btn); color: var(--btntx); font-size: 13.5px; font-weight: 800; text-decoration: none; }

/* 출전마 — 말마다 한 칸: 왼쪽 마번·마명/기수/조교사, 오른쪽 세 열(단승 인기 · 체중 · 배당), 아래 전적 한 줄과 신호 알약 */
.lv-th, .lv-hr { display: grid; grid-template-columns: minmax(0, 1fr) 80px 54px 36px; gap: 0 6px; }
.lv-th.is-no, .lv-hr.is-no { grid-template-columns: minmax(0, 1fr) 80px 54px; }
.lv-th { font-size: 10px; color: var(--sub); font-weight: 700; padding: 5px 0 4px; border-top: 1px solid var(--line); line-height: 1.4; }
.lv-th span:not(:first-child) { text-align: right; }
.lv-hint { font-size: 11px; font-weight: 700; color: var(--ice); padding: 0 0 5px; line-height: 1.5; }
.lv-hr { padding: 7px 0 6px; border-top: 1px solid var(--line); align-items: start; }
.lv-n1 { display: flex; align-items: center; gap: 5px; min-width: 0; }
.lv-n1 b { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lv-n1 b a { text-decoration: none; }
.lv-mk { font-size: 14px; font-weight: 900; color: var(--sig); white-space: nowrap; width: 20px; text-align: center; flex: none; }
.lv-mk.is-rank { font-size: 10px; color: var(--ice); }
.lv-s { font-size: 11px; color: var(--sub); line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-s a { text-decoration: none; }
.lv-s i { font-style: normal; color: var(--sig); font-weight: 700; }
.lv-fw { grid-column: 1 / -1; font-size: 11px; color: var(--sub); line-height: 1.6; }
.lv-fw b { color: var(--tx); font-weight: 600; }
.lv-hr.has-mk .lv-s, .lv-hr.has-mk .lv-fw { padding-left: 25px; }
.lv-v { text-align: right; display: flex; flex-direction: column; line-height: 1.6; min-width: 0; }
.lv-v b { font-size: 13px; font-weight: 800; color: var(--tx); white-space: nowrap; }
.lv-v .is-none { color: var(--sub); font-weight: 700; }
.lv-v span { font-size: 10.5px; color: var(--sub); white-space: nowrap; }
.lv-v span.is-sig { color: var(--sig); font-weight: 700; }
.lv-v .lv-up, .lv-v .lv-dn { font-size: 10.5px; }
.lv-v .lv-up { color: var(--up); }
.lv-v .lv-dn { color: var(--dn); }
.lv-pl { display: inline-block; padding: 0 7px; border-radius: 999px; background: var(--pill); color: var(--ice); font-size: 10.5px; font-weight: 700; margin: 2px 3px 0 0; line-height: 1.7; }
.lv-wdr { display: flex; align-items: center; gap: 5px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--sub); }
.lv-wdr b { text-decoration: line-through; font-weight: 700; }
.lv-legend { border-top: 1px solid var(--line); padding-top: 5px; }

/* 결과 — 5착 표 · 배당 7종 · AI 결과 */
.lv-rt { display: grid; grid-template-columns: 28px minmax(0, 1fr) 48px 44px 32px 42px; gap: 5px; font-size: 11.5px; align-items: center; }
.lv-rt .lv-hh { font-size: 10px; color: var(--sub); font-weight: 700; line-height: 1.3; }
.lv-rt .ta-r { text-align: right; white-space: nowrap; }
.lv-rt small { font-size: 10px; color: var(--sub); }
.lv-pn { font-size: 14px; }
.lv-r1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lv-r1 > span:not(.lv-chip) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.lv-r1 b { font-size: 13px; font-weight: 800; }
.lv-dvg { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 8px; font-size: 11.5px; line-height: 1.5; align-items: center; }
.lv-dvg span { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.lv-dvg .is-on { font-weight: 800; }
.lv-dash { display: inline-flex; align-items: center; gap: 2px; }
.lv-dash i { font-style: normal; opacity: .6; }

/* 마번 칩 — 공식 번호색. 숫자는 항상 보인다. 밝은 바탕의 1번은 테두리, 어두운 바탕의 4번은 링. */
.lv-chip { position: relative; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; border-radius: 6px; font-variant-numeric: tabular-nums; flex: none; width: 22px; height: 22px; font-size: 12.5px; line-height: 1; box-sizing: border-box; }
.lv-chip.lv-xs { width: 17px; height: 17px; font-size: 10.5px; border-radius: 4px; }
.lv-chip.lv-m { width: 26px; height: 26px; font-size: 14.5px; border-radius: 7px; }
.lv-chip.lv-l { width: 32px; height: 32px; font-size: 17.5px; border-radius: 8px; }
.lv-chip.lv-xl { width: 42px; height: 42px; font-size: 23px; border-radius: 10px; }
.lv-g1 { background: #FFFFFF; color: #17243A; }
.lv-day .lv-g1 { box-shadow: inset 0 0 0 1px #C3CCD8; }
.lv-g2 { background: #FFE23D; color: #17243A; }
.lv-g3 { background: #D32F2F; color: #FFFFFF; }
.lv-g4 { background: #1C1C21; color: #FFFFFF; }
.lv-night .lv-g4 { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.lv-g5 { background: #1F6FD8; color: #FFFFFF; }
.lv-g6 { background: #21854A; color: #FFFFFF; }
.lv-g7 { background: #7B4B35; color: #FFFFFF; }
.lv-g8 { background: #D81B60; color: #FFFFFF; }
.lv-g9 { background: #8E24AA; color: #FFFFFF; }
.lv-g10 { background: #4FC3F7; color: #17243A; }
.lv-g11 { background: #24375A; color: #FFFFFF; box-shadow: inset 0 0 0 1.5px #AEBBD0; }   /* 11번 이상 중립 (공식 기준 확인 전 임시) */
.lv-chip.lv-star::after { content: '★'; position: absolute; right: -5px; top: -9px; font-size: 10.5px; color: var(--sig, #8A5A00); line-height: 1; }
.lv-am { color: var(--sig); font-weight: 900; font-size: 13px; line-height: 1; flex: none; }
.lv-am.lv-xs { font-size: 11px; }
.lv-am.lv-l { font-size: 16px; }
.lv-am.lv-xl { font-size: 20px; }

/* 오늘 일정 */
.lv-progress { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 0 0 2px; }
.lv-progress .lv-cells { display: inline-flex; gap: 2px; }
.lv-progress .lv-cell { width: 7px; height: 10px; border-radius: 2px; box-shadow: inset 0 0 0 1.5px var(--lv-outline); background: #fff; }
.lv-progress .lv-cell.f { background: var(--lv-ink); box-shadow: none; }
.lv-progress .lv-cell.n { background: #C77700; box-shadow: none; }
.lv-progress .lv-cell.w { background: var(--lv-cobalt); box-shadow: none; }
.lv-progress .lv-cell.c { background: #CBD2DE; box-shadow: none; }
.lv-sr { display: grid; grid-template-columns: 62px 40px minmax(0, 1fr) auto; gap: 6px; align-items: center; font-size: 12px; min-height: 44px; border-top: 1px solid var(--line); cursor: pointer; }
.lv-sr[aria-current="true"] { background: var(--lv-tint); box-shadow: -6px 0 0 var(--lv-tint), 6px 0 0 var(--lv-tint); }
.lv-sr:focus-visible { outline: 2px solid var(--lv-action); outline-offset: 1px; }
.lv-sr .lv-sname { font-weight: 800; white-space: nowrap; }
.lv-sr.is-cancelled .lv-sname { text-decoration: line-through; color: var(--sub); }
.lv-sr.is-done .lv-sname { font-weight: 700; }
.lv-smid { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lv-sr > .lv-sub:last-child { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv .lv-pinbtn { position: relative; min-height: 26px; padding: 2px 10px; border-radius: 999px; background: var(--pill); color: var(--ice); font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.lv-pinbtn::after { content: ''; position: absolute; inset: -9px -4px; }
.lv .lv-pinbtn[aria-pressed="true"] { background: var(--ice); color: #fff; }

/* 상태 줄 */
.lv-status { font-size: 11px; color: var(--lv-muted); text-align: center; margin: 0; min-height: 16px; }
.lv-status.is-stale { color: var(--lv-signal); font-weight: 700; }
.lv.is-stale .lv-now, .lv.is-stale .lv-sched { opacity: .75; }

/* 설정 시트 (승식 · 경마장) */
.lv-sheet { position: fixed; inset: 0; z-index: 200; background: rgba(17, 28, 46, .45); display: flex; align-items: flex-end; justify-content: center; }
.lv-sheet-box { width: 100%; max-width: 560px; background: #fff; border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 -8px 30px rgba(17, 28, 46, .2); }
.lv-sheet-box h2 { margin: 0; font-size: 15px; font-weight: 900; }
.lv-sheet-box h2 .lv-sub { color: var(--lv-muted); font-weight: 500; }
.lv-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.lv .lv-opt { position: relative; min-height: 44px; padding: 8px 14px; border-radius: 12px; font-size: 14px; font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--lv-outline); background: #fff; }
.lv .lv-opt[aria-pressed="true"] { background: var(--lv-ink); color: #fff; box-shadow: none; }
.lv .lv-opt:disabled { opacity: .4; cursor: default; }
.lv .lv-sheet-close { min-height: 48px; border-radius: 12px; background: var(--lv-tint); font-size: 14px; font-weight: 800; color: var(--lv-ink); }

.lv-noscript { font-size: 14px; color: #3D4A5E; line-height: 1.6; }
