.race-data-shell{max-width:1500px;margin:0 auto;padding:18px 18px 40px}
.race-data-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:8px 0 14px}
.race-data-head h1{margin:0;font-size:30px;color:#17324d}
.race-data-head p{margin:5px 0 0;color:#607286;font-size:14px}
.race-status{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.race-badge{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:#eef5fb;color:#244864;font-size:12px;font-weight:700}
.race-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px;background:#fff;border:1px solid #dce7f1;border-radius:12px;box-shadow:0 2px 10px rgba(24,52,77,.05)}
.race-toolbar .group{display:flex;gap:6px;flex-wrap:wrap}
.race-toolbar .group+.group{padding-left:10px;border-left:1px solid #e3eaf0}
.race-btn{appearance:none;border:1px solid #cfdce7;background:#fff;color:#244864;border-radius:8px;padding:8px 12px;font-size:13px;font-weight:700;cursor:pointer}
.race-btn:hover{background:#f5f9fc}
.race-btn.on{background:#173f68;color:#fff;border-color:#173f68}
.race-btn.disabled{opacity:.42;cursor:not-allowed}
.race-layout{display:grid;grid-template-columns:190px minmax(0,1fr) 280px;gap:14px;margin-top:14px}
.race-sidebar,.race-main,.race-ai-side{background:#fff;border:1px solid #dce7f1;border-radius:12px;box-shadow:0 2px 10px rgba(24,52,77,.05)}
.race-sidebar{padding:10px;align-self:start;position:sticky;top:10px}
.race-side-title{font-size:13px;font-weight:800;color:#17324d;padding:8px 9px;border-bottom:1px solid #e8eef4;margin-bottom:6px}
.race-side-menu{display:flex;flex-direction:column;gap:4px}
.race-side-menu button{border:0;background:transparent;text-align:left;padding:9px 10px;border-radius:7px;color:#43576a;font-weight:700;font-size:13px;cursor:pointer}
.race-side-menu button:hover{background:#f2f7fb}
.race-side-menu button.on{background:#e7f1fb;color:#113b63}
.race-main{overflow:hidden}
.race-list-wrap{padding:12px;border-bottom:1px solid #e5edf4;background:#f8fbfd}
.race-list-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.race-list-title b{font-size:15px;color:#17324d}
.race-list-title span{font-size:12px;color:#718293}
.race-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.race-card{border:1px solid #d5e1eb;background:#fff;border-radius:9px;padding:9px 10px;cursor:pointer;min-width:0}
.race-card:hover{border-color:#8aacc8;background:#fbfdff}
.race-card.on{border:2px solid #184c79;padding:8px 9px;background:#eef6fc}
.race-card .top{display:flex;align-items:center;justify-content:space-between;gap:5px}
.race-card .meet{font-weight:900;color:#183a5b}
.race-card .time{font-size:12px;color:#5f7588}
.race-card .meta{margin-top:5px;font-size:11px;color:#667b8e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.race-detail-head{padding:15px 16px 10px;border-bottom:1px solid #e4edf4}
.race-detail-title{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.race-detail-title h2{font-size:23px;margin:0;color:#153a5d}
.race-detail-title .info{font-size:13px;color:#4d6479}
.race-detail-sub{margin-top:7px;font-size:12px;color:#718293;display:flex;gap:10px;flex-wrap:wrap}
.race-tabs{display:flex;gap:4px;overflow-x:auto;padding:9px 12px;background:#f7fafc;border-bottom:1px solid #e4edf4}
.race-tab{white-space:nowrap;border:1px solid #d7e2ec;background:#fff;border-radius:7px;padding:7px 10px;font-size:12px;font-weight:700;color:#43596d;cursor:pointer}
.race-tab.on{background:#173f68;color:#fff;border-color:#173f68}
.race-table-wrap{overflow:auto}
.race-table{width:100%;border-collapse:collapse;min-width:1150px;font-size:12px}
.race-table th{position:sticky;top:0;background:#eef4f8;color:#29465f;border-bottom:1px solid #cad9e5;padding:8px 6px;text-align:center;white-space:nowrap}
.race-table td{border-bottom:1px solid #e5edf3;padding:8px 6px;text-align:center;white-space:nowrap;color:#334b5f}
.race-table tr:hover td{background:#fbfdff}
.horse-cell{text-align:left!important;font-weight:800;color:#173a5d!important;cursor:pointer}
.gate{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;border-radius:50%;background:#1a456d;color:#fff;font-weight:900}
.ai-chip{display:inline-flex;padding:3px 6px;border-radius:999px;background:#edf4fa;color:#2c5878;font-size:10px;font-weight:800;margin:1px}
.ai-chip.dark{background:#fff3cd;color:#7a5a00}
.ai-chip.w{background:#fde7e7;color:#8b2424}
.race-empty{padding:35px 18px;text-align:center;color:#718293}
.race-ai-side{padding:12px;align-self:start;position:sticky;top:10px}
.ai-side-title{font-size:15px;font-weight:900;color:#17324d;padding-bottom:9px;border-bottom:1px solid #e5edf4}
.ai-side-block{padding:10px 0;border-bottom:1px solid #edf2f6}
.ai-side-block:last-child{border-bottom:0}
.ai-side-block h4{margin:0 0 7px;font-size:12px;color:#52687b}
.ai-side-big{font-size:20px;font-weight:900;color:#143d64}
.ai-side-small{font-size:11px;line-height:1.55;color:#6b7e90}
.provider-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.provider-box{border:1px solid #dde7ef;border-radius:7px;padding:7px;background:#fafcfe}
.provider-box b{display:block;font-size:11px;color:#2b4e68}
.provider-box span{font-size:12px;color:#5e7284}
.panel-placeholder{padding:28px 18px;color:#64798b;line-height:1.7}
.panel-placeholder b{display:block;color:#1c4568;margin-bottom:6px}
@media(max-width:1180px){.race-layout{grid-template-columns:160px minmax(0,1fr)}.race-ai-side{grid-column:1/-1;position:static}.race-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:820px){.race-data-shell{padding:10px}.race-layout{grid-template-columns:1fr}.race-sidebar{position:static}.race-side-menu{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.race-side-menu button{text-align:center;padding:8px 5px}.race-list{grid-template-columns:repeat(2,minmax(0,1fr))}.race-data-head{align-items:flex-start;flex-direction:column}.race-status{justify-content:flex-start}}
@media(max-width:520px){.race-list{grid-template-columns:1fr}.race-side-menu{grid-template-columns:repeat(2,minmax(0,1fr))}.race-toolbar .group+.group{border-left:0;padding-left:0}.race-detail-title h2{font-size:20px}}

/* RACE DATA CENTER V2 — 2026-10-08 */
.race-layout{grid-template-columns:minmax(0,1fr) 290px}
.race-sidebar{display:none}
.race-list-wrap{margin-top:14px;background:#fff;border:1px solid #dce7f1;border-radius:12px;box-shadow:0 2px 10px rgba(24,52,77,.05)}
.race-list{grid-template-columns:repeat(6,minmax(0,1fr))}
.race-card{padding:8px 9px}
.race-card .meet{font-size:13px}.race-card .time{font-weight:800;color:#254f72}
.race-tab.ai999-tab{border-color:#b78300;background:#fff8da;color:#765700}
.race-tab.ai999-tab.on{background:#8b6800;color:#fff;border-color:#8b6800}
.race-table.compact{min-width:1280px}
.source-note{padding:10px 14px;border-top:1px solid #e5edf3;background:#fafcfe;font-size:11px;color:#6a7d8f;line-height:1.55}
.ai-analysis-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:12px;background:#f7fafc;border-bottom:1px solid #e4edf4}
.ai-analysis-cards>div{border:1px solid #dce6ee;border-radius:9px;background:#fff;padding:10px;text-align:center}
.ai-analysis-cards b{display:block;font-size:11px;color:#65798b;margin-bottom:5px}
.ai-analysis-cards strong{font-size:18px;color:#173f68}
.ai-side-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:10px}
.ai-side-actions a{display:block;padding:8px 5px;text-align:center;border:1px solid #d5e1eb;border-radius:7px;text-decoration:none;font-size:11px;font-weight:800;color:#234b6d;background:#fafcff}
.horse-modal{display:none;position:fixed;inset:0;z-index:99999;background:rgba(8,25,40,.62);align-items:center;justify-content:center;padding:20px}
.horse-modal.open{display:flex}
.horse-modal-card{position:relative;width:min(960px,96vw);max-height:88vh;overflow:auto;background:#fff;border-radius:14px;box-shadow:0 22px 70px rgba(0,0,0,.3);padding:20px}
.horse-modal-close{position:absolute;right:12px;top:8px;border:0;background:transparent;font-size:30px;line-height:1;color:#52687b;cursor:pointer}
.horse-modal-head{display:flex;align-items:center;gap:12px;padding-right:38px;border-bottom:1px solid #e5edf3;padding-bottom:12px}
.horse-modal-head h3{margin:0;color:#163b5f;font-size:24px}.horse-modal-head p{margin:4px 0 0;color:#687d8f;font-size:12px}
.horse-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:14px 0}
.horse-kpis>div{border:1px solid #dce6ee;border-radius:9px;padding:9px;text-align:center;background:#f9fbfd}
.horse-kpis b{display:block;font-size:10px;color:#718394;margin-bottom:4px}.horse-kpis strong{font-size:15px;color:#173f68}
.horse-modal-card h4{margin:14px 0 7px;color:#173f68}
@media(max-width:1300px){.race-list{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:980px){.race-layout{grid-template-columns:1fr}.race-ai-side{position:static}.race-list{grid-template-columns:repeat(3,minmax(0,1fr))}.ai-analysis-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.horse-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){.race-list{grid-template-columns:repeat(2,minmax(0,1fr))}.horse-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.race-tabs{padding:8px}.race-tab{padding:7px 8px}}

/* 1440px ONE-SCREEN ENTRY TABLE */
.race-table.compact{width:100%;min-width:0!important;table-layout:fixed;font-size:10px}
.race-table.compact th,.race-table.compact td{padding:7px 3px;overflow:hidden;text-overflow:ellipsis}
.race-table.compact th:nth-child(1),.race-table.compact td:nth-child(1){width:42px}
.race-table.compact th:nth-child(2),.race-table.compact td:nth-child(2){width:92px;text-align:left}
.race-table.compact th:nth-child(3),.race-table.compact td:nth-child(3){width:64px}
.race-table.compact th:nth-child(4),.race-table.compact td:nth-child(4){width:64px}
.race-table.compact th:nth-child(5),.race-table.compact td:nth-child(5){width:70px}
.race-table.compact th:nth-child(6),.race-table.compact td:nth-child(6){width:44px}
.race-table.compact th:nth-child(7),.race-table.compact td:nth-child(7){width:42px}
.race-table.compact th:nth-child(8),.race-table.compact td:nth-child(8){width:36px}
.race-table.compact th:nth-child(9),.race-table.compact td:nth-child(9){width:36px}
.race-table.compact th:nth-child(10),.race-table.compact td:nth-child(10){width:48px}
.race-table.compact th:nth-child(11),.race-table.compact td:nth-child(11){width:54px}
.race-table.compact th:nth-child(12),.race-table.compact td:nth-child(12){width:58px}
.race-table.compact th:nth-child(13),.race-table.compact td:nth-child(13){width:54px}
.race-table.compact th:nth-child(14),.race-table.compact td:nth-child(14){width:88px}
.race-table.compact th:nth-child(15),.race-table.compact td:nth-child(15){width:50px}
.race-table.compact .ai-chip{font-size:9px;padding:2px 4px}
.race-table.compact .gate{width:22px;height:22px;font-size:10px}
@media(max-width:1180px){.race-table.compact{min-width:930px!important;table-layout:auto}}

/* MOBILE HARDENING */
@media(max-width:600px){
  html,body{max-width:100%;overflow-x:hidden}
  .topbar{padding:12px 14px 9px;gap:8px}
  .ai999-header-brand-logo{width:min(280px,88vw);max-height:76px}
  .top-actions{max-width:100%;overflow:hidden}
  .small-links{display:block;max-width:100%;overflow-x:auto;white-space:nowrap;text-align:left;padding-bottom:3px}
  .main-nav{width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}
  .main-nav a{flex:0 0 auto;min-width:max-content;padding:0 16px}
  .main-nav .home{width:54px;min-width:54px}
  .main-nav .premium{margin-left:0;min-width:max-content}
  .race-data-shell{width:auto;max-width:100%;padding:10px 10px 28px}
  .race-data-head{width:100%}.race-data-head h1{font-size:27px}
  .race-data-head p{white-space:normal;line-height:1.45}
  .race-status{width:100%;justify-content:flex-start}
  .race-toolbar{width:auto}
  .race-list{grid-template-columns:1fr!important}
  .race-list-wrap,.race-main,.race-ai-side{min-width:0;max-width:100%}
  .race-layout{grid-template-columns:minmax(0,1fr)}
  .race-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .race-table.compact{min-width:930px!important}
  .ai-analysis-cards{grid-template-columns:1fr 1fr}
}

/* HORSE DETAIL V4 */
.horse-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.horse-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 16px}
.horse-stat-grid>div{border:1px solid #d9e4ed;border-radius:9px;padding:10px;background:#fff}
.horse-stat-grid b{display:block;font-size:10px;color:#6d8091;margin-bottom:5px}
.horse-stat-grid strong{display:block;font-size:15px;color:#173f68}
.horse-stat-grid span{display:block;font-size:10px;color:#728495;margin-top:3px}
@media(max-width:700px){
  .horse-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .horse-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* FINAL COLOR POLISH V5 — 2026-10-08
   Layout/logic unchanged. Color hierarchy only. */
.race-data-head h1{color:#0b3158}
.race-data-head h1::first-letter{color:#b88600}
.race-badge:nth-child(1){background:#eef6ff;color:#15518a;border:1px solid #d7e8f7}
.race-badge:nth-child(2){background:#fff7df;color:#7a5900;border:1px solid #f0df9c}
.race-badge:nth-child(3){background:#edf8f2;color:#167047;border:1px solid #cfeada}

.race-btn[data-meet="SEOUL"]{color:#1d4f91}
.race-btn[data-meet="BUSAN"]{color:#7a3fa0}
.race-btn[data-meet="JEJU"]{color:#13805c}
.race-btn[data-meet="ALL"]{color:#9a3b2f}
.race-btn.on{background:#173f68;color:#fff!important;border-color:#173f68}

.race-card .meet{color:#123f70}
.race-card .time{color:#b33a32;font-weight:900}
.race-card .meta{color:#61798d}
.race-card.on{border-color:#b78300;background:#fffaf0;box-shadow:inset 0 0 0 1px #e9c969}
.race-card.on .meet{color:#7f5900}
.race-card.on .time{color:#c33a31}

.race-detail-title h2{color:#0d4172}
.race-detail-title .info{color:#a34332;font-weight:700}
.race-detail-sub span:nth-child(1){color:#70511d}
.race-detail-sub span:nth-child(2){color:#2e6e4f}
.race-detail-sub span:nth-child(3){color:#704494}
.race-detail-sub span:nth-child(4){color:#a04a34}

/* Tabs: semantic pastel accents */
.race-tab:nth-child(1){background:#eef6ff;color:#174f83;border-color:#cfe1f1}
.race-tab:nth-child(2){background:#f3f8ef;color:#3f7542;border-color:#d8e8ce}
.race-tab:nth-child(3){background:#fff6e7;color:#9a6114;border-color:#f0d9b0}
.race-tab:nth-child(4){background:#edf9f7;color:#137365;border-color:#cfe9e4}
.race-tab:nth-child(5){background:#fff0f1;color:#a13e49;border-color:#f1ccd0}
.race-tab:nth-child(6){background:#f7f0fb;color:#734292;border-color:#dfcfea}
.race-tab:nth-child(7){background:#f2f4ff;color:#4b55a1;border-color:#d7dcf3}
.race-tab:nth-child(8){background:#fff3e8;color:#a05a25;border-color:#efd8c2}
.race-tab.ai999-tab{background:#fff7cf;color:#7a5700;border-color:#e2c458}
.race-tab.on{background:#173f68!important;color:#fff!important;border-color:#173f68!important}
.race-tab.ai999-tab.on{background:#9b7200!important;border-color:#9b7200!important}

/* Entry table: color by information meaning */
.race-table th{background:#eef4f8;color:#29465f}
.race-table.compact th:nth-child(2){color:#0e477a}
.race-table.compact th:nth-child(3){color:#18714b}
.race-table.compact th:nth-child(4){color:#6b4091}
.race-table.compact th:nth-child(5){color:#80551d}
.race-table.compact th:nth-child(6){color:#a63f37}
.race-table.compact th:nth-child(7){color:#9a6a00}
.race-table.compact th:nth-child(10){color:#75469a}
.race-table.compact th:nth-child(11){color:#39754c}
.race-table.compact th:nth-child(12){color:#08766f}
.race-table.compact th:nth-child(13){color:#a15b21}
.race-table.compact th:nth-child(14){color:#5f4593}
.race-table.compact th:nth-child(15){color:#b33636}

.race-table.compact td:nth-child(2){color:#0d4678!important}
.race-table.compact td:nth-child(3){color:#17734b;font-weight:700}
.race-table.compact td:nth-child(4){color:#6d4392;font-weight:700}
.race-table.compact td:nth-child(5){color:#7e551f}
.race-table.compact td:nth-child(6){color:#b33d35;font-weight:800}
.race-table.compact td:nth-child(7){color:#9a6a00;font-weight:700}
.race-table.compact td:nth-child(10){color:#744397;font-weight:800}
.race-table.compact td:nth-child(11){color:#34794e;font-weight:700}
.race-table.compact td:nth-child(12){color:#0c7770;font-weight:700}
.race-table.compact td:nth-child(13){color:#a45a20;font-weight:700}
.race-table.compact td:nth-child(14){color:#654896;font-weight:700}
.race-table.compact td:nth-child(15){color:#bd3434;font-weight:900}
.race-table tr:nth-child(even) td{background:#fbfcfe}
.race-table tr:hover td{background:#fff9ea}

.gate{background:#173f68;border:1px solid #0e3153}
.ai-chip{background:#eef1fb;color:#4e5392}
.ai-chip.dark{background:#fff0c8;color:#8a5b00;border:1px solid #e7cc7b}
.ai-chip.w{background:#fde4e4;color:#9c2929}

.ai-side-title{color:#0e4779}
.ai-side-block:nth-of-type(2) h4{color:#a35c1b}
.ai-side-block:nth-of-type(3) h4{color:#7b469d}
.ai-side-block:nth-of-type(4) h4{color:#b13d37}
.ai-side-block:nth-of-type(5) h4{color:#177152}
.ai-side-big{color:#153f67}
#aiRaceState{color:#a05b13}
#aiChaos{color:#714291}
#aiDark{color:#b23835}

.provider-box:nth-child(1){background:#eef6ff;border-color:#d3e4f3}
.provider-box:nth-child(1) b{color:#15518a}
.provider-box:nth-child(2){background:#f3f8ef;border-color:#d9e8cf}
.provider-box:nth-child(2) b{color:#397447}
.provider-box:nth-child(3){background:#fff2ed;border-color:#efd6cd}
.provider-box:nth-child(3) b{color:#a34a35}
.provider-box:nth-child(4){background:#f5f0fb;border-color:#e1d3ed}
.provider-box:nth-child(4) b{color:#704493}

.ai-side-actions a:nth-child(1){background:#eef6ff;color:#14518a;border-color:#cfe1f1}
.ai-side-actions a:nth-child(2){background:#fff1ed;color:#a44534;border-color:#efd2c9}
.ai-side-actions a:nth-child(3){background:#f5f0fb;color:#704493;border-color:#dfd0eb}
.ai-side-actions a:nth-child(4){background:#edf8f2;color:#17704a;border-color:#cee8da}

/* Horse modal color hierarchy */
.horse-modal-head h3{color:#0b477a}
.horse-kpis>div:nth-child(1) strong{color:#17734b}
.horse-kpis>div:nth-child(2) strong{color:#704493}
.horse-kpis>div:nth-child(3) strong{color:#a55a20}
.horse-kpis>div:nth-child(4) strong{color:#b33d35}
.horse-kpis>div:nth-child(5) strong{color:#9a6a00}
.horse-kpis>div:nth-child(6) strong{color:#0d7770}
.horse-kpis>div:nth-child(7) strong{color:#b43232}
.horse-kpis>div:nth-child(8) strong{color:#73509a}
.horse-stat-grid>div:nth-child(1){background:#eef6ff}
.horse-stat-grid>div:nth-child(2){background:#edf8f2}
.horse-stat-grid>div:nth-child(3){background:#f5f0fb}
.horse-stat-grid>div:nth-child(4){background:#fff2ed}
.horse-stat-grid>div:nth-child(5){background:#fff8e4}
.horse-stat-grid>div:nth-child(6){background:#edf9f7}
.horse-stat-grid>div:nth-child(1) strong{color:#15518a}
.horse-stat-grid>div:nth-child(2) strong{color:#17734b}
.horse-stat-grid>div:nth-child(3) strong{color:#704493}
.horse-stat-grid>div:nth-child(4) strong{color:#a34b36}
.horse-stat-grid>div:nth-child(5) strong{color:#8a6500}
.horse-stat-grid>div:nth-child(6) strong{color:#0d7770}

.horse-modal-nav{margin:0 34px 16px 0;padding:12px;background:#f1f6fb;border:1px solid #dae5f0;border-radius:10px}
.horse-nav-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.horse-nav-fields label{font-size:12px;font-weight:700;color:#274663;display:flex;flex-direction:column;gap:4px}
.horse-nav-fields select{width:100%;min-width:0;background:#fff;border:1px solid #bdcfe1;border-radius:7px;padding:8px 6px;font-size:13px;color:#132e4a}
.horse-nav-arrows{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:10px}
.horse-nav-arrows button{padding:7px 12px;border:1px solid #a9bed1;background:#fff;border-radius:7px;color:#173b5b;font-weight:800;cursor:pointer}
.horse-nav-arrows button:disabled{opacity:.35;cursor:default}
.horse-nav-arrows span{font-size:12px;color:#546d83}
@media(max-width:700px){.horse-nav-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.horse-modal-nav{margin-right:25px;padding:8px}}

/* AI999 YEONGCHEON RACE-LIST GREEN */
.race-card.ai999-yeongcheon .meet{color:#148043!important;font-weight:900!important}
