:root{
  color-scheme:dark;
  --bg:#090b0d;
  --panel:#111419;
  --panel2:#15191f;
  --line:#242b33;
  --muted:#8c98a6;
  --text:#f4f6f8;
  --green:#43e861;
  --red:#ff626d;
  --blue:#4ea3df;
  --pink:#d16a97;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,Arial,sans-serif}
body{overflow-x:hidden}
.top{
  position:sticky;top:0;z-index:5000;width:100%;
  background:#151515;border-bottom:1px solid rgba(255,255,255,.075);
  box-shadow:none
}
.top-inner{
  width:100%;max-width:none;height:56px;padding:0 10px;
  display:flex;align-items:center;gap:10px
}
.brand-row{
  display:flex;align-items:center;gap:9px;flex:0 0 auto;height:100%;
  color:#fff;text-decoration:none;padding:0 9px 0 0;
  border-right:1px solid rgba(255,255,255,.08)
}
.brand-logo{width:38px;height:38px;display:block;flex:0 0 auto}
.brand{font-size:19px;line-height:1;font-weight:700;letter-spacing:.045em;white-space:nowrap}
.header-spacer{flex:1 1 auto;min-width:8px}
.main-date-nav{display:flex;align-items:center;gap:4px;flex:0 0 auto}
.main-date-btn,.main-date-current{
  height:36px;border:1px solid rgba(255,255,255,.10);background:#111;color:#dce2e8;
  border-radius:6px;display:inline-flex;align-items:center;justify-content:center;
  font:700 11px Verdana,Arial,sans-serif
}
.main-date-btn{width:32px;min-width:32px;padding:0;cursor:pointer}
.main-date-btn:hover{background:#1b1b1b;border-color:rgba(255,255,255,.17)}
.main-date-btn[disabled]{visibility:hidden;pointer-events:none}
.main-date-current{padding:0 9px;min-width:126px;white-space:nowrap}
.filters{
  display:flex;align-items:center;justify-content:flex-end;gap:5px;
  flex:0 1 auto;min-width:0;margin:0;white-space:nowrap
}
.filters select,.filters input,.filters button,.header-icon-link{
  height:36px;border-radius:6px;font:13px Verdana,Arial,sans-serif
}
.filters select{
  color:#e9edf1;background:#111;border:1px solid rgba(255,255,255,.10);
  padding:0 28px 0 10px;min-width:0;outline:none;cursor:pointer
}
.filters select:hover,.filters select:focus{
  background:#1b1b1b;border-color:rgba(255,255,255,.17)
}
#meetingFilter{width:145px}
#raceFilter{width:128px}
#marketFilter{width:132px}
.inplay-toggle{
  height:36px;min-width:112px;padding:0 11px;border-radius:6px;
  border:1px solid rgba(255,255,255,.13);background:#111;color:#dce2e8;
  font:700 12px Verdana,Arial,sans-serif;display:inline-flex;
  align-items:center;justify-content:center;gap:7px;white-space:nowrap;cursor:pointer
}
.inplay-toggle:hover{background:#1b1b1b;border-color:rgba(255,255,255,.20)}
.inplay-toggle.active{background:#351013;border-color:#ff4c58;color:#fff}
.inplay-live-dot{
  width:8px;height:8px;border-radius:50%;background:#66717d;display:inline-block
}
.inplay-toggle.has-live .inplay-live-dot,
.inplay-toggle.active .inplay-live-dot{
  background:#ff4c58;box-shadow:0 0 0 3px rgba(255,76,88,.16)
}
.inplay-toggle.disconnected .inplay-live-dot{
  background:#e7a63b;box-shadow:none
}
#directionFilter{width:136px}
#limitFilter{width:96px}
.search-control{
  position:relative;width:190px;min-width:150px;height:36px;display:flex;
  align-items:center;border:1px solid rgba(255,255,255,.10);
  border-radius:6px;background:#111;
  transition:border-color .18s ease,background .18s ease,width .18s ease
}
.search-control:focus-within{
  width:225px;background:#1b1b1b;border-color:rgba(77,171,115,.65)
}
.search-control svg{
  position:absolute;left:10px;width:16px;height:16px;color:#9da5ad;pointer-events:none
}
.search-control input{
  width:100%;height:100%;min-width:0;padding:0 9px 0 34px;
  color:#f1f3f5;background:transparent;border:0;outline:0
}
.search-control input::placeholder{color:#878f97}
.header-icon-button,.header-icon-link{
  width:36px;min-width:36px;height:36px;display:inline-flex;align-items:center;
  justify-content:center;padding:0;color:#aab1b8;background:transparent;
  border:1px solid transparent;border-radius:6px;text-decoration:none;cursor:pointer;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease
}
.header-icon-button:hover,.header-icon-link:hover{
  color:#fff;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.04)
}
.header-icon-button svg,.header-icon-link svg{width:18px;height:18px;display:block}
.header-separator{
  width:1px;height:24px;margin:0 2px;background:rgba(255,255,255,.08);flex:0 0 auto
}

.market-open-link{
  color:#d9e6f2;
  text-decoration:none;
  font-size:12px;
  font-weight:700;
  border:1px solid #3a4652;
  padding:8px 11px;
  border-radius:8px;
  background:#192028;
  white-space:nowrap;
}
.market-open-link:hover{
  background:#222c36;
  border-color:#526170;
}

.canvas-wrap{
  position:relative;
  z-index:1;
  overflow:hidden;
  background:
    radial-gradient(circle at 15% 18%,rgba(60,255,110,.055),transparent 22%),
    radial-gradient(circle at 82% 28%,rgba(58,170,255,.05),transparent 24%),
    radial-gradient(circle at 48% 82%,rgba(60,255,110,.045),transparent 24%),
    linear-gradient(180deg,#06080b 0%,#090b0d 100%);
}
#bubbleArea{
  position:relative;
  width:100%;
  min-height:620px;
  padding:0;
  overflow:hidden;
}
#bubbleCanvas{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  touch-action:none;
  cursor:auto;
}

.bubble{
  position:absolute;
  left:0;
  top:0;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  cursor:grab;
  user-select:none;
  touch-action:none;
  overflow:visible;
  will-change:transform;
}
.bubble.dragging{
  cursor:grabbing;
  z-index:9999!important;
}
.bubble.dragging .bubble-core{
  transform:scale(1.045);
  filter:brightness(1.12);
}
.bubble-core{
  position:relative;
  width:100%;
  height:100%;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  overflow:hidden;
  border:2px solid rgba(255,255,255,.12);
  transition:transform .12s ease,filter .12s ease,box-shadow .12s ease;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.035),
    inset 0 0 22px rgba(255,255,255,.035);
}
.bubble-core::before{
  content:"";
  position:absolute;
  inset:5%;
  border-radius:50%;
  background:
    radial-gradient(circle at 32% 23%,rgba(255,255,255,.24) 0%,rgba(255,255,255,.09) 12%,rgba(255,255,255,0) 34%);
  pointer-events:none;
}
.bubble-core::after{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:50%;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 0 0 1px rgba(255,255,255,.03);
  pointer-events:none;
}
.bubble:hover{z-index:100!important}
.bubble:hover .bubble-core{transform:scale(1.055);filter:brightness(1.06)}

.bubble.steamer .bubble-core{
  background:
    radial-gradient(circle at 36% 30%,rgba(105,255,137,.18) 0%,rgba(62,195,82,.15) 18%,rgba(16,54,25,.94) 50%,#08120a 100%);
  border-color:rgba(84,255,116,.68);
  box-shadow:
    inset 0 0 42px rgba(74,255,117,.15),
    inset 0 0 10px rgba(255,255,255,.06),
    0 0 18px rgba(62,255,94,.18),
    0 0 46px rgba(62,255,94,.11);
}

/* Bigger movers become visibly more saturated, like Crypto Bubbles. */
.bubble.big-mover.steamer .bubble-core{
  background:
    radial-gradient(circle at 35% 28%,rgba(117,255,145,.30) 0%,rgba(41,177,65,.27) 20%,rgba(9,62,20,.98) 55%,#040d06 100%);
  border-color:rgba(66,255,91,.92);
  box-shadow:
    inset 0 0 54px rgba(41,255,74,.25),
    inset 0 0 12px rgba(255,255,255,.08),
    0 0 24px rgba(38,255,70,.34),
    0 0 60px rgba(38,255,70,.17);
}

.bubble.huge-mover.steamer .bubble-core{
  background:
    radial-gradient(circle at 34% 27%,rgba(128,255,153,.38) 0%,rgba(45,203,67,.34) 21%,rgba(7,69,19,.99) 57%,#020a04 100%);
  border-color:#39ff59;
  box-shadow:
    inset 0 0 70px rgba(42,255,71,.32),
    inset 0 0 14px rgba(255,255,255,.10),
    0 0 28px rgba(40,255,68,.50),
    0 0 78px rgba(40,255,68,.23);
}
.bubble.steamer .bubble-core::after{
  box-shadow:
    inset 0 0 0 1px rgba(140,255,168,.08),
    0 0 0 1px rgba(94,255,126,.14),
    0 0 24px rgba(94,255,126,.18);
}

.bubble.drifter .bubble-core{
  background:
    radial-gradient(circle at 36% 30%,rgba(255,127,135,.16) 0%,rgba(155,74,80,.13) 18%,rgba(58,24,29,.95) 50%,#15090b 100%);
  border-color:rgba(255,108,119,.6);
  box-shadow:
    inset 0 0 38px rgba(255,116,126,.12),
    inset 0 0 8px rgba(255,255,255,.04),
    0 0 18px rgba(255,86,98,.13),
    0 0 40px rgba(255,86,98,.08);
}

.bubble.big-mover.drifter .bubble-core{
  background:
    radial-gradient(circle at 35% 28%,rgba(255,135,143,.27) 0%,rgba(190,55,64,.25) 20%,rgba(77,13,20,.98) 56%,#160306 100%);
  border-color:rgba(255,71,82,.92);
  box-shadow:
    inset 0 0 54px rgba(255,54,67,.23),
    inset 0 0 12px rgba(255,255,255,.07),
    0 0 24px rgba(255,47,61,.31),
    0 0 60px rgba(255,47,61,.15);
}

.bubble.huge-mover.drifter .bubble-core{
  background:
    radial-gradient(circle at 34% 27%,rgba(255,144,151,.34) 0%,rgba(219,48,59,.32) 21%,rgba(91,8,16,.99) 58%,#120103 100%);
  border-color:#ff3748;
  box-shadow:
    inset 0 0 70px rgba(255,42,58,.30),
    inset 0 0 14px rgba(255,255,255,.09),
    0 0 29px rgba(255,37,53,.46),
    0 0 78px rgba(255,37,53,.22);
}
.bubble.drifter .bubble-core::after{
  box-shadow:
    inset 0 0 0 1px rgba(255,164,171,.05),
    0 0 0 1px rgba(255,113,124,.11),
    0 0 22px rgba(255,90,102,.13);
}

.bubble.flat .bubble-core{
  background:
    radial-gradient(circle at 36% 30%,rgba(126,142,158,.12) 0%,rgba(74,87,98,.08) 18%,rgba(25,31,38,.96) 54%,#0d1116 100%);
  border-color:rgba(176,192,208,.28);
  box-shadow:
    inset 0 0 28px rgba(171,189,204,.06),
    0 0 12px rgba(160,176,192,.05);
}

.bubble-inner{
  width:88%;
  pointer-events:none;
  position:relative;
  z-index:2;
}
.silk{
  width:26%;
  max-width:58px;
  max-height:48px;
  object-fit:contain;
  display:block;
  margin:0 auto 4px;
  filter:drop-shadow(0 2px 5px rgba(0,0,0,.42));
}
.bname{
  font-weight:700;
  line-height:1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  padding:0 6px;
  text-shadow:0 2px 6px rgba(0,0,0,.86);
  letter-spacing:-.2px;
}
.move{
  font-weight:800;
  margin-top:4px;
  letter-spacing:-.5px;
  text-shadow:0 2px 6px rgba(0,0,0,.78);
}
.odds{
  font-size:.57em;
  color:#d8e1ea;
  margin-top:4px;
  font-weight:650;
  text-shadow:0 1px 4px rgba(0,0,0,.6);
}
.race-mini{
  font-size:.48em;
  color:#95a6b7;
  margin-top:3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


.bubble.linked-hover .bubble-core{
  transform:scale(1.06);
  filter:brightness(1.15);
  box-shadow:
    inset 0 0 36px rgba(255,255,255,.10),
    0 0 0 2px rgba(255,255,255,.20),
    0 0 30px rgba(255,255,255,.12);
}

.horse-list{
  position:relative;
  z-index:2;
  background:#0b0e11;
  border-top:1px solid #262d35;
  padding:0 20px 50px;
}
.list-head{
  max-width:1860px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px 0 12px;
}
.list-title{
  font-size:18px;
  font-weight:900;
  letter-spacing:.2px;
}
.list-sub{
  color:#7f8b98;
  font-size:12px;
  margin-top:3px;
}
.list-count{
  color:#9ba8b5;
  font-size:12px;
  background:#12171c;
  border:1px solid #28313a;
  border-radius:999px;
  padding:6px 9px;
}
.table-wrap{
  max-width:1860px;
  margin:0 auto;
  overflow-x:auto;
  border:1px solid #252d35;
  border-radius:10px;
  background:#101419;
}
.horse-table{
  width:100%;
  border-collapse:collapse;
  min-width:1080px;
  font-size:12px;
}
.horse-table th{
  text-align:left;
  color:#7f8c99;
  font-weight:700;
  background:#12171c;
  border-bottom:1px solid #29313a;
  padding:10px 12px;
  white-space:nowrap;
  cursor:pointer;
  user-select:none;
}
.horse-table th:hover{
  color:#fff;
  background:#161c22;
}
.horse-table td{
  padding:10px 12px;
  border-bottom:1px solid #20272e;
  color:#aeb9c4;
  white-space:nowrap;
}
.horse-table tbody tr{
  cursor:pointer;
  transition:background .12s ease;
}
.horse-table tbody tr:hover,
.horse-table tbody tr.linked-hover{
  background:#171d23;
}
.horse-table tbody tr:last-child td{border-bottom:0}
.tbl-horse{
  display:flex;
  align-items:center;
  gap:8px;
  color:#fff;
  font-weight:800;
  min-width:180px;
}
.tbl-silk{
  width:28px;
  height:28px;
  object-fit:contain;
  flex:0 0 28px;
}
.tbl-move{
  font-weight:900;
}
.tbl-move.up{color:#57e777}
.tbl-move.down{color:#ff737c}
.tbl-price{color:#e5ebf1;font-weight:700}
.tbl-muted{color:#7f8d9b}
.tbl-result{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:34px;padding:3px 7px;border-radius:999px;
  border:1px solid #3a454f;background:#171d23;
  color:#dfe7ee;font-weight:900
}
.tbl-result.winner{color:#66ee88;border-color:#2f7b49;background:#13251a}
.tbl-result.nr{color:#9ca8b4}
.sort-arrow{margin-left:5px;color:#657381}
@media(max-width:700px){
  .horse-list{padding-left:10px;padding-right:10px}
  .list-head{align-items:flex-start;flex-direction:column}
}
.tooltip{
  position:fixed;z-index:1000;pointer-events:none;
  min-width:235px;max-width:320px;
  background:#11161c;border:1px solid #3b4754;border-radius:10px;
  padding:11px 12px;box-shadow:0 14px 38px rgba(0,0,0,.52);
  display:none;font-size:12px
}
.tooltip .tt-name{font-size:15px;font-weight:900;margin-bottom:7px}
.tooltip .row{display:flex;justify-content:space-between;gap:15px;margin:4px 0;color:#9daab7}
.tooltip .row b{color:#fff;text-align:right}

.empty{padding:55px;text-align:center;color:#84909d}
.legend{
  position:fixed;right:14px;bottom:14px;z-index:15;
  background:rgba(13,17,21,.93);border:1px solid #29333d;
  border-radius:9px;padding:8px 10px;font-size:11px;color:#aab5c0
}
.legend span{display:inline-flex;align-items:center;gap:5px;margin-left:8px}
.dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.dot.g{background:#43e861}.dot.r{background:#ff626d}

/* Runner detail modal */
.modal-backdrop{
  position:fixed;inset:0;z-index:10000;
  background:rgba(0,0,0,.73);backdrop-filter:blur(4px);
  display:none;align-items:center;justify-content:center;padding:22px
}
.modal-backdrop.open{display:flex}
.runner-modal{
  width:min(1180px,96vw);max-height:90vh;overflow:hidden;
  background:#111419;border:1px solid #303943;border-radius:15px;
  box-shadow:0 24px 80px rgba(0,0,0,.65)
}
.modal-head{
  display:flex;align-items:center;gap:14px;
  padding:14px 16px;border-bottom:1px solid #272e36;background:#15191e
}
.modal-silk{width:46px;height:46px;object-fit:contain}
.modal-title-wrap{min-width:0;flex:1}
.modal-title{font-size:20px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.modal-sub{font-size:12px;color:#8d9aa7;margin-top:3px}
.modal-market-links{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.market-open-link{
  display:inline-flex;align-items:center;justify-content:center;
  color:#d9e6f2;text-decoration:none;font-size:12px;font-weight:700;
  border:1px solid #3a4652;padding:8px 11px;border-radius:8px;
  background:#192028;white-space:nowrap
}
.market-open-link:hover{background:#222c36;border-color:#526170}
.market-open-link.ladbrokes{border-color:#4d3c70;background:#1b1725;color:#eee7ff}
.market-open-link.ladbrokes:hover{background:#251f32;border-color:#705a9d}
.modal-close{border:0;background:transparent;color:#9eabb8;font-size:26px;padding:4px 8px}
.modal-tabs{display:flex;border-bottom:1px solid #262d35;background:#12161b}
.modal-tab{
  border:0;border-radius:0;background:transparent;color:#8f9ba8;
  padding:13px 18px;border-bottom:2px solid transparent;font-weight:700
}
.modal-tab.active{color:#fff;border-bottom-color:#59c779;background:#151a20}
.modal-body{display:none;max-height:calc(90vh - 110px);overflow:auto}
.modal-body.active{display:block}

.overview-grid{
  display:grid;grid-template-columns:390px 1fr;min-height:520px
}
.side-panel{border-right:1px solid #272e36;padding:16px}
.price-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.price-card{
  background:#161c22;border:1px solid #2b3540;border-radius:10px;padding:12px
}
.price-card .label{color:#8694a2;font-size:11px;text-transform:uppercase;letter-spacing:.5px}
.price-card .big{font-size:26px;font-weight:900;margin-top:3px}
.price-card.green .big{color:#58df73}
.price-card.red .big{color:#ff747c}
.info-row{
  display:flex;justify-content:space-between;gap:15px;
  padding:10px 2px;border-bottom:1px solid #232a31;
  color:#96a2af;font-size:13px
}
.info-row b{color:#fff;text-align:right}
.chart-panel{padding:18px 20px}
.chart-title{font-size:13px;color:#9aa7b4;margin-bottom:10px}
.two-point-chart{
  width:100%;height:360px;background:#12171c;border:1px solid #252e37;border-radius:10px;overflow:hidden
}
.chart-note{color:#788694;font-size:11px;margin-top:9px;line-height:1.5}
.move-banner{
  margin-top:14px;padding:12px;border-radius:10px;border:1px solid #29343e;background:#151b21;
  display:flex;justify-content:space-between;align-items:center;gap:10px
}
.move-banner .mv{font-size:26px;font-weight:950}
.move-banner.steamer .mv{color:#52e56e}
.move-banner.drifter .mv{color:#ff6f78}

.result-card{
  display:none;margin-top:12px;padding:12px;
  border:1px solid #33404a;border-radius:10px;background:#141a20
}
.result-card.show{display:block}
.result-card-title{
  color:#fff;font-size:12px;font-weight:900;text-transform:uppercase;
  letter-spacing:.55px;margin-bottom:7px
}
.result-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:8px
}
.result-mini{
  background:#10151a;border:1px solid #28323b;border-radius:8px;padding:8px
}
.result-mini span{display:block;color:#83919e;font-size:10px;text-transform:uppercase}
.result-mini b{display:block;color:#fff;font-size:15px;margin-top:2px}
.result-comment{
  color:#a8b4bf;font-size:12px;line-height:1.45;
  border-top:1px solid #28313a;padding-top:8px;white-space:normal
}
.result-source-note{color:#71808d;font-size:10px;margin-top:7px}

.external-wrap{height:calc(90vh - 110px);display:flex;flex-direction:column}
.external-bar{
  display:flex;justify-content:space-between;align-items:center;gap:10px;
  padding:10px 12px;border-bottom:1px solid #272e36;background:#12171c;font-size:12px;color:#8f9ca8
}
.external-link{color:#a8d6ff;text-decoration:none}
.external-frame{width:100%;flex:1;border:0;background:#fff}
.external-fallback{padding:14px;color:#93a0ad;font-size:12px}

@media(max-width:1150px){
  .top-inner{gap:7px;padding:0 8px}
  .brand-row{padding-right:7px}
  .brand{font-size:17px}
  .brand-logo{width:34px;height:34px}
  .main-date-current{min-width:106px;padding:0 7px;font-size:10px}
  .main-date-btn{width:30px;min-width:30px}
  .filters{
    overflow-x:auto;overflow-y:hidden;justify-content:flex-start;
    scrollbar-width:none;-ms-overflow-style:none
  }
  .filters::-webkit-scrollbar{display:none}
  #meetingFilter{width:132px;min-width:132px}
  #raceFilter{width:118px;min-width:118px}
  #marketFilter{width:122px;min-width:122px}
  .inplay-toggle{min-width:108px}
  #directionFilter{width:126px;min-width:126px}
  #limitFilter{width:88px;min-width:88px}
  .search-control{width:165px;min-width:165px}
  .search-control:focus-within{width:190px}
}
@media(max-width:700px){
  .top-inner{height:52px}
  .brand-row{gap:6px}
  .brand{font-size:15px}
  .brand-logo{width:31px;height:31px}
  .main-date-current{min-width:88px;max-width:88px;overflow:hidden;text-overflow:ellipsis}
  .main-date-btn{width:28px;min-width:28px}
  .header-spacer{display:none}
  .filters{flex:1}
  .overview-grid{grid-template-columns:1fr}
  .modal-head{gap:8px;flex-wrap:wrap}
  .modal-title-wrap{min-width:180px}
  .modal-market-links{order:3;width:100%;gap:6px}
  .market-open-link{flex:1;padding:7px 8px;font-size:11px}
  .modal-close{margin-left:auto}
  .side-panel{border-right:0;border-bottom:1px solid #272e36}
  .two-point-chart{height:300px}
}
