*{box-sizing:border-box}body{margin:0;font-family:Arial,"Noto Sans KR",sans-serif;background:#f4f6f8;color:#172033}header{background:#101b33;color:#fff;padding:18px 24px;display:flex;justify-content:space-between;align-items:center}.brand{font-size:26px;letter-spacing:.3px}.brand b{color:#ffd54a}.sub{opacity:.8}main{max-width:1280px;margin:18px auto;padding:0 16px}.panel,.status,.cross{background:#fff;border:1px solid #dce2ea;border-radius:12px;padding:16px;margin-bottom:14px;box-shadow:0 2px 8px rgba(0,0,0,.04)}.tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.tab{padding:13px;border:1px solid #ccd5e1;background:#f8fafc;border-radius:9px;font-weight:700;cursor:pointer}.tab.active{background:#152a50;color:#fff;border-color:#152a50}.query-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:16px}.combo-inputs{display:flex;gap:6px;align-items:center}.combo-inputs input{width:72px;text-align:center;font-size:22px;font-weight:700;padding:9px;border:1px solid #b9c3d1;border-radius:8px}.primary{padding:11px 26px;border:0;border-radius:8px;background:#d71920;color:#fff;font-weight:800;cursor:pointer}.filters{margin-top:14px;border-top:1px solid #e7ebf0;padding-top:10px}.filters summary{font-weight:800;cursor:pointer}.filter-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:12px}.filter-grid label{font-size:13px;font-weight:700}.filter-grid input,.filter-grid select{display:block;width:100%;margin-top:5px;padding:8px;border:1px solid #cbd4df;border-radius:6px;background:#fff}.status{font-weight:700}.summary{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin-bottom:14px}.card{background:#fff;border:1px solid #dce2ea;border-radius:10px;padding:13px;text-align:center}.card .v{font-size:23px;font-weight:900;color:#172d55;margin-top:5px}.card .k{font-size:12px;color:#667085}.cross{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.hidden{display:none}.cross-card{padding:12px;border-radius:8px;background:#f7f9fc}.cross-card b{font-size:18px}.result-title{display:flex;align-items:center;justify-content:space-between}.result-title h2{margin:0 0 10px}.table-wrap{overflow:auto;max-height:560px}table{width:100%;border-collapse:collapse;font-size:13px;white-space:nowrap}th,td{border-bottom:1px solid #e4e8ee;padding:8px;text-align:center}th{position:sticky;top:0;background:#192c4d;color:#fff;z-index:1}tr:hover td{background:#fff9db}.high{font-weight:800;color:#c8171d}.note{text-align:center;color:#687386;font-size:12px}@media(max-width:800px){header{display:block}.sub{margin-top:5px}.tabs{grid-template-columns:repeat(2,1fr)}.filter-grid{grid-template-columns:repeat(2,1fr)}.summary{grid-template-columns:repeat(2,1fr)}.cross{grid-template-columns:1fr}.combo-inputs input{width:58px}}
.visual-grid{display:grid;grid-template-columns:1.35fr .85fr;gap:14px;margin-bottom:14px}
.visual-card{margin-bottom:0}.visual-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.visual-head h2{font-size:18px;margin:0}.visual-head span{font-size:12px;color:#687386}
.timeline{min-height:180px}.time-axis{position:relative;height:78px;margin:10px 16px 0}.axis-line{position:absolute;left:0;right:0;top:31px;height:4px;background:#dce2ea;border-radius:4px}.dot{position:absolute;top:20px;transform:translateX(-50%);width:26px;height:26px;border-radius:50%;border:3px solid #fff;background:#244a83;color:#fff;box-shadow:0 0 0 2px #244a83;cursor:pointer;font-size:10px;font-weight:800}.dot-high{background:#d71920;box-shadow:0 0 0 2px #d71920}.axis-label{position:absolute;top:52px;font-size:11px;color:#687386}.axis-start{left:0}.axis-end{right:0}.timeline-list{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-top:8px;max-height:170px;overflow:auto}.timeline-list>div{display:grid;grid-template-columns:1.1fr .9fr .7fr;gap:8px;padding:7px 8px;background:#f7f9fc;border-radius:7px;font-size:12px}.timeline-list span{color:#667085}.timeline-list strong{text-align:right;color:#c8171d}
.bars{display:flex;flex-direction:column;gap:10px}.bar-row{display:grid;grid-template-columns:88px 1fr 26px;gap:9px;align-items:center;font-size:12px}.bar-label{color:#475467}.bar-track{height:18px;background:#eef2f6;border-radius:9px;overflow:hidden}.bar-fill{height:100%;background:linear-gradient(90deg,#284e86,#d71920);border-radius:9px;min-width:0}.bar-row b{text-align:right}.empty{padding:46px 0;text-align:center;color:#98a2b3}
@media(max-width:900px){.visual-grid{grid-template-columns:1fr}.timeline-list{grid-template-columns:1fr}}

.compare-panel{margin-bottom:14px}.actions{display:flex;gap:8px;flex-wrap:wrap}.ghost{border:1px solid #b9c3d1;background:#fff;color:#243b63;padding:8px 12px;border-radius:7px;font-weight:800;cursor:pointer}.ghost:hover{background:#f6f8fb}.compare-matrix{display:grid;grid-template-columns:150px repeat(3,1fr);border:1px solid #e0e6ed;border-radius:10px;overflow:hidden}.compare-matrix>div{padding:10px;border-right:1px solid #e0e6ed;border-bottom:1px solid #e0e6ed;text-align:center}.compare-matrix>div:nth-child(4n){border-right:0}.compare-matrix .head{background:#192c4d;color:#fff;font-weight:800}.compare-matrix .label{background:#f7f9fc;text-align:left;font-weight:700}.compare-matrix .best{font-weight:900;color:#c8171d}.saved-searches{margin-top:10px;display:flex;gap:6px;flex-wrap:wrap}.saved-chip{display:flex;gap:6px;align-items:center;background:#eef3f9;border:1px solid #d6deea;border-radius:999px;padding:6px 9px;font-size:12px}.saved-chip button{border:0;background:transparent;cursor:pointer;font-weight:800}.toast{position:fixed;right:18px;bottom:18px;background:#172033;color:#fff;padding:11px 14px;border-radius:8px;box-shadow:0 4px 18px rgba(0,0,0,.2);z-index:99}
@media(max-width:800px){.compare-matrix{grid-template-columns:110px repeat(3,minmax(90px,1fr));overflow:auto}.actions{width:100%}.ghost{flex:1}}

.click-row{cursor:pointer}.click-row:hover td{background:#fff4d6}
.mobile-cards{display:none}.mobile-card{width:100%;border:1px solid #dce2ea;background:#fff;border-radius:10px;padding:12px;text-align:left;margin-top:8px;cursor:pointer}.mc-top,.mc-main,.mc-sub{display:flex;justify-content:space-between;gap:8px;align-items:center}.mc-top{font-size:12px}.mc-top strong{color:#c8171d;font-size:16px}.mc-main{margin-top:9px;font-size:14px}.mc-sub{margin-top:7px;color:#667085;font-size:12px}
.detail-drawer{position:fixed;inset:0;z-index:100}.detail-drawer.hidden{display:none}.detail-backdrop{position:absolute;inset:0;background:rgba(12,20,36,.48)}.detail-panel{position:absolute;right:0;top:0;height:100%;width:min(520px,94vw);background:#fff;padding:22px;overflow:auto;box-shadow:-8px 0 28px rgba(0,0,0,.18)}.detail-close{position:absolute;right:14px;top:12px;border:0;background:#eef2f6;width:34px;height:34px;border-radius:50%;font-size:22px;cursor:pointer}.detail-title{display:flex;justify-content:space-between;align-items:flex-start;padding-right:42px;border-bottom:1px solid #e6eaf0;padding-bottom:14px}.detail-title span{font-size:12px;color:#667085}.detail-title h3{margin:4px 0 0}.detail-title>strong{font-size:24px;color:#c8171d}.detail-result{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:16px 0}.detail-result>div{background:#f7f9fc;border-radius:8px;padding:11px;text-align:center}.detail-result span{display:block;font-size:11px;color:#667085}.detail-result b{display:block;margin-top:5px;font-size:17px}.detail-providers{display:grid;grid-template-columns:1fr 1fr;gap:10px}.detail-provider{border:1px solid #dce2ea;border-radius:9px;padding:12px}.detail-provider h4{margin:0 0 9px}.detail-provider>div{display:flex;justify-content:space-between;padding:6px 0;border-top:1px solid #eef1f4;font-size:13px}.detail-provider span{color:#667085}.detail-provider.muted{opacity:.55}.detail-note{margin-top:16px;padding:10px;background:#fff8e1;border-radius:8px;font-size:12px;color:#65531c}.drawer-open{overflow:hidden}
@media(max-width:700px){
  main{padding:0 10px}.summary{grid-template-columns:repeat(2,1fr)}.card .v{font-size:18px}.compare-panel{overflow:auto}.compare-matrix{min-width:540px}
  .table-wrap{display:none}.mobile-cards{display:block}.result-panel{padding:12px}.result-title h2{font-size:17px}
  .detail-panel{width:100%;padding:18px 14px}.detail-result{grid-template-columns:1fr 1fr}.detail-result>div:first-child{grid-column:1/-1}.detail-providers{grid-template-columns:1fr}
  .query-row{gap:8px}.query-row label{font-size:12px}.primary{width:100%}.combo-inputs{width:100%;justify-content:center}.combo-inputs input{flex:1;max-width:88px}
  .filter-grid{grid-template-columns:1fr 1fr}.visual-head{align-items:flex-start;gap:8px}.visual-head h2{font-size:16px}
}

/* AI999 TRIO MEGA SEARCH V1 */
.ai999-mega-search{max-width:1560px}
.search-dual-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}
.search-dual-grid>.panel{margin-bottom:14px;min-width:0}
.search-kind-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:-2px 0 12px;padding-bottom:10px;border-bottom:1px solid #e5eaf0}
.search-kind-head b{font-size:18px;color:#172d55}
.search-kind-head span{font-size:12px;color:#687386;font-weight:700}
.trio-head b{color:#7a2f80}
.trio-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.trio-tab{padding:13px;border:1px solid #d5c6dc;background:#fbf8fc;border-radius:9px;font-weight:800;cursor:pointer;color:#55305b}
.trio-tab.active{background:#6f3478;color:#fff;border-color:#6f3478}
.trio-order-lock{font-size:13px;font-weight:800;color:#6f3478;white-space:nowrap}
.trio-help{margin:6px 0 2px 4px;font-size:12px;color:#6f7f90;line-height:1.45}
.trio-help span{color:#9aa7b3}
.trifecta-search-panel .filter-grid,.trio-filter-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:12px}
.trio-filter-grid label{font-size:13px;font-weight:700}
.trio-filter-grid input,.trio-filter-grid select{display:block;width:100%;margin-top:5px;padding:8px;border:1px solid #cbd4df;border-radius:6px;background:#fff}
.trio-status{margin-top:13px;padding:9px 10px;background:#f8f2fa;border:1px solid #eadcf0;border-radius:8px;color:#623269;font-size:12px;font-weight:800}
.trio-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:10px}
.trio-mini-card{background:#faf7fb;border:1px solid #eadff0;border-radius:8px;padding:8px;text-align:center}
.trio-mini-card span{display:block;font-size:10px;color:#7d7182}
.trio-mini-card b{display:block;margin-top:3px;font-size:15px;color:#55275d}
.trio-result-head{display:flex;justify-content:space-between;align-items:center;margin:12px 0 7px;font-size:13px}
.trio-result-head b{color:#4e2a55}
.trio-result-head span{color:#687386}
.trio-table-wrap{overflow:auto;max-height:320px;border:1px solid #e5e7eb;border-radius:8px}
.trio-table{font-size:11px}
.trio-table th{background:#6f3478}
.trio-table td,.trio-table th{padding:7px 6px}
.trio-payout-high{font-weight:900;color:#b01862}
@media(max-width:1120px){.search-dual-grid{grid-template-columns:1fr}.trifecta-search-panel .filter-grid,.trio-filter-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:700px){.trio-tabs{grid-template-columns:repeat(2,1fr)}.trio-summary{grid-template-columns:repeat(2,1fr)}.trifecta-search-panel .filter-grid,.trio-filter-grid{grid-template-columns:1fr 1fr}}

.trio-compare-block,.trio-visual-box{margin-top:10px;border:1px solid #eadff0;border-radius:9px;background:#fff;padding:9px}
.trio-subhead{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:7px;font-size:12px}
.trio-subhead b{color:#55275d}.trio-subhead span{color:#7d7182;font-size:10px}
.trio-compare-matrix{display:grid;grid-template-columns:88px repeat(3,1fr);border:1px solid #ece6ef;border-radius:8px;overflow:hidden;font-size:10px}
.trio-compare-matrix>div{padding:6px 5px;text-align:center;border-right:1px solid #ece6ef;border-bottom:1px solid #ece6ef}
.trio-compare-matrix>div:nth-child(4n){border-right:0}.trio-compare-matrix .head{background:#6f3478;color:#fff;font-weight:800}
.trio-compare-matrix .label{text-align:left;background:#faf7fb;font-weight:700;color:#5d4862}
.trio-visual-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.trio-timeline{max-height:125px;overflow:auto}
.trio-time-row{display:grid;grid-template-columns:78px 1fr 62px;gap:6px;padding:5px 6px;border-radius:6px;background:#faf7fb;margin-bottom:4px;font-size:10px}
.trio-time-row strong{text-align:right;color:#a11f5a}
.trio-bars{display:flex;flex-direction:column;gap:6px}
.trio-bar-row{display:grid;grid-template-columns:62px 1fr 20px;gap:6px;align-items:center;font-size:10px}
.trio-bar-track{height:12px;background:#f0e8f2;border-radius:7px;overflow:hidden}.trio-bar-fill{height:100%;background:linear-gradient(90deg,#8a4b92,#b01862);border-radius:7px}
.trio-table tr.click-row{cursor:pointer}
@media(max-width:700px){.trio-visual-grid{grid-template-columns:1fr}.trio-compare-matrix{grid-template-columns:72px repeat(3,minmax(70px,1fr))}}

.trio-actions-row{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-top:10px;flex-wrap:wrap}
.trio-actions{display:flex;gap:6px;flex-wrap:wrap}
.trio-sort-label{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:800;color:#5d4862}
.trio-sort-label select{padding:7px 9px;border:1px solid #d8cce0;border-radius:7px;background:#fff;color:#55275d;font-weight:700}
.trio-saved-searches{min-height:28px}
@media(max-width:700px){.trio-actions-row{align-items:stretch}.trio-actions{width:100%}.trio-actions .ghost{flex:1}.trio-sort-label{width:100%;justify-content:flex-end}}

/* AI999 TRIO V4 VISUAL POLISH */
.search-dual-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.trifecta-search-panel,.trio-search-panel{height:100%}
.trifecta-search-panel{border-top:4px solid #183a66}
.trio-search-panel{border-top:4px solid #7a2f80}
.trio-pay-base b{color:#3b4655}
.trio-pay-100 b{color:#b71c1c}
.trio-pay-300{background:#fff7cc}.trio-pay-300 b{color:#b71c1c}
.trio-pay-500{background:#f5e3ff}.trio-pay-500 b{color:#8a1f8f}
.trio-pay-1000{background:#dff2ff}.trio-pay-1000 b{color:#0f5f8f}
.trio-pay-badge{display:inline-block;min-width:42px;margin-right:5px;padding:2px 5px;border-radius:999px;font-size:9px;font-weight:900;vertical-align:1px}
.trio-pay-badge.b300{background:#ffe57a;color:#7a5900}
.trio-pay-badge.b500{background:#d8a9ef;color:#4e1f5a}
.trio-pay-badge.b1000{background:#9bd8f5;color:#17465f}
.trio-table tbody tr:nth-child(even) td{background-color:rgba(248,249,251,.6)}
.trio-table tbody tr:hover td{box-shadow:inset 0 0 0 9999px rgba(255,241,196,.45)}
.trio-result-head{padding-top:2px;border-top:1px dashed #e6dbea}
.trio-status{display:flex;align-items:center;min-height:38px}
@media(max-width:1120px){.trifecta-search-panel,.trio-search-panel{height:auto}}
@media(max-width:700px){
 .search-kind-head{align-items:flex-start}.search-kind-head b{font-size:16px}
 .trio-table-wrap{max-height:420px}
 .trio-table{min-width:720px}
 .trio-pay-badge{display:block;width:max-content;margin:0 auto 3px}
 .trio-status{font-size:11px;line-height:1.45}
}

.trio-color-legend{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:0 0 7px;font-size:10px;color:#5f6670}
.trio-color-legend span{display:flex;align-items:center;gap:4px}.trio-color-legend i{width:11px;height:11px;border-radius:3px;display:inline-block;border:1px solid rgba(0,0,0,.08)}
.trio-color-legend .lg100{background:#fff}.trio-color-legend .lg300{background:#fff7cc}.trio-color-legend .lg500{background:#f5e3ff}.trio-color-legend .lg1000{background:#dff2ff}
.trio-color-legend em{font-style:normal;color:#9aa1aa;margin-left:auto}
@media(max-width:700px){.trio-color-legend em{width:100%;margin-left:0}}

/* AI999 TRIFECTA VISUAL POLISH V1 */
.trifecta-threshold-strip{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:10px 0 2px;padding:8px 9px;border:1px solid #dbe4ef;border-radius:9px;background:#f7faff}
.trifecta-threshold-strip b{font-size:11px;color:#28476d;margin-right:2px}
.trifecta-threshold-strip span{padding:4px 8px;border-radius:999px;background:#183a66;color:#fff;font-size:10px;font-weight:900}
.trifecta-color-legend{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:0 0 7px;font-size:10px;color:#5f6670}
.trifecta-color-legend span{display:flex;align-items:center;gap:4px}.trifecta-color-legend i{width:11px;height:11px;border-radius:3px;display:inline-block;border:1px solid rgba(0,0,0,.08)}
.trifecta-color-legend .tf300{background:#fff3a8}.trifecta-color-legend .tf1000{background:#ffe88a}.trifecta-color-legend .tf3000{background:#e7bf47}.trifecta-color-legend .tf5000{background:#ddb7ee}.trifecta-color-legend .tf10000{background:#ccecff}
.trifecta-color-legend em{font-style:normal;color:#9aa1aa;margin-left:auto}
.tf-pay-base b{color:#222}
.tf-pay-300{background:#fff3a8}.tf-pay-300 b{color:#b71c1c}
.tf-pay-1000{background:#ffe88a}.tf-pay-1000 b{color:#b71c1c}
.tf-pay-3000{background:#e7bf47}.tf-pay-3000 b{color:#a31616}
.tf-pay-5000{background:#ddb7ee}.tf-pay-5000 b{color:#a31616}
.tf-pay-10000{background:#ccecff}.tf-pay-10000 b{color:#a31616}
.tf-pay-badge{display:inline-block;min-width:42px;margin-right:5px;padding:2px 5px;border-radius:999px;font-size:9px;font-weight:900;vertical-align:1px}
.tf-pay-badge.b300,.tf-pay-badge.b500,.tf-pay-badge.b1000{background:#ffd84d;color:#694d00}
.tf-pay-badge.b3000{background:#c59822;color:#fff}.tf-pay-badge.b5000{background:#8f54a5;color:#fff}.tf-pay-badge.b10000{background:#55a8d2;color:#fff}
.result-panel{border-top:4px solid #183a66}
.result-panel tbody tr:nth-child(even) td{background-color:rgba(248,249,251,.65)}
.result-panel tbody tr:hover td{box-shadow:inset 0 0 0 9999px rgba(255,241,196,.35)}
@media(max-width:700px){.trifecta-threshold-strip b{width:100%}.trifecta-color-legend em{width:100%;margin-left:0}.tf-pay-badge{display:block;width:max-content;margin:0 auto 3px}}

/* AI999 TRIFECTA COMPACT PANEL V2 */
.tf-compact-status{margin-top:13px;padding:9px 10px;background:#f2f6fb;border:1px solid #d9e4f1;border-radius:8px;color:#24486f;font-size:12px;font-weight:800}
.tf-compact-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:10px}
.tf-mini-card{background:#f8fbff;border:1px solid #dfe8f3;border-radius:8px;padding:8px;text-align:center}
.tf-mini-card span{display:block;font-size:10px;color:#718198}.tf-mini-card b{display:block;margin-top:3px;font-size:15px;color:#173d69}
.tf-compact-block{margin-top:10px;border:1px solid #dfe8f3;border-radius:9px;background:#fff;padding:9px}
.tf-compact-head{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:7px;font-size:12px}
.tf-compact-head b{color:#173d69}.tf-compact-head span{color:#718198;font-size:10px}
.tf-compact-compare{display:grid;grid-template-columns:88px repeat(3,1fr);border:1px solid #e3eaf2;border-radius:8px;overflow:hidden;font-size:10px}
.tf-compact-compare>div{padding:6px 5px;text-align:center;border-right:1px solid #e3eaf2;border-bottom:1px solid #e3eaf2}
.tf-compact-compare>div:nth-child(4n){border-right:0}.tf-compact-compare .head{background:#183a66;color:#fff;font-weight:800}.tf-compact-compare .label{text-align:left;background:#f7faff;font-weight:700;color:#435a73}
.tf-compact-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.tf-compact-timeline{max-height:125px;overflow:auto}.tf-time-row{display:grid;grid-template-columns:78px 1fr 68px;gap:6px;padding:5px 6px;border-radius:6px;background:#f7faff;margin-bottom:4px;font-size:10px}.tf-time-row strong{text-align:right;color:#b0181e}
.tf-compact-bars{display:flex;flex-direction:column;gap:6px}.tf-bar-row{display:grid;grid-template-columns:68px 1fr 20px;gap:6px;align-items:center;font-size:10px}.tf-bar-track{height:12px;background:#eaf0f7;border-radius:7px;overflow:hidden}.tf-bar-fill{height:100%;background:linear-gradient(90deg,#315f91,#d71920);border-radius:7px}
.tf-preview-head{display:flex;justify-content:space-between;align-items:center;margin:12px 0 7px;padding-top:2px;border-top:1px dashed #dce5ef;font-size:13px}.tf-preview-head b{color:#173d69}.tf-preview-head span{color:#687386}
.tf-preview-wrap{overflow:auto;max-height:320px;border:1px solid #e2e8f0;border-radius:8px}.tf-preview-table{font-size:11px}.tf-preview-table th{background:#183a66}.tf-preview-table td,.tf-preview-table th{padding:7px 6px}
@media(max-width:700px){.tf-compact-grid{grid-template-columns:1fr}.tf-compact-summary{grid-template-columns:repeat(2,1fr)}.tf-compact-compare{grid-template-columns:72px repeat(3,minmax(70px,1fr))}.tf-preview-table{min-width:560px}}
