:root{
  --bg:#eef5fb;
  --panel:#ffffff;
  --panel-soft:#f7fbff;
  --line:#dbe7f2;
  --text:#162336;
  --muted:#6c7b8d;
  --blue:#1f6feb;
  --blue-dark:#1659be;
  --green:#0d9f6e;
  --red:#dc3b3b;
  --shadow:0 18px 50px rgba(31,64,104,.12);
  --radius:22px;
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:linear-gradient(135deg,#eaf4ff,#f7fbff);color:var(--text)}
button,input,select{font:inherit}
.app-shell{min-height:100vh;display:grid;grid-template-columns:360px 1fr;gap:18px;padding:18px}
.left-panel,.right-panel{background:rgba(255,255,255,.78);border:1px solid rgba(219,231,242,.95);box-shadow:var(--shadow);backdrop-filter:blur(12px);border-radius:28px}
.left-panel{padding:18px;display:flex;flex-direction:column;gap:16px;min-width:0}
.right-panel{padding:20px;min-width:0;overflow:hidden}
.brand{display:flex;align-items:center;gap:12px;padding:6px 4px 10px}
.brand-mark{width:48px;height:48px;border-radius:16px;background:var(--blue);color:#fff;display:grid;place-items:center;font-weight:900;font-size:24px;box-shadow:0 12px 25px rgba(31,111,235,.25)}
h1,h2,h3,p{margin:0}h1{font-size:24px;letter-spacing:-.5px}p,.eyebrow,label,.total-box span,.stat span,#emptyHint{color:var(--muted)}.eyebrow,label{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.07em}.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 8px 25px rgba(31,64,104,.07)}
.quick-form{padding:15px;display:grid;gap:12px}.field-row,.field-grid>div,.game-form>div{display:grid;gap:7px}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
input,select{width:100%;height:46px;border:1px solid var(--line);background:#fff;border-radius:14px;padding:0 12px;color:var(--text);outline:none}input:focus,select:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(31,111,235,.12)}
.primary-btn,.ghost-btn{border:0;border-radius:15px;height:46px;font-weight:900;cursor:pointer}.primary-btn{background:var(--blue);color:#fff;box-shadow:0 10px 22px rgba(31,111,235,.20)}.primary-btn:hover{background:var(--blue-dark)}.wide{width:100%;margin-top:14px}.ghost-btn{background:var(--panel-soft);color:var(--blue);padding:0 14px;border:1px solid var(--line)}
.section-list{display:grid;gap:10px;overflow:auto;padding-right:2px}.section-item{border:1px solid var(--line);background:var(--panel-soft);border-radius:18px;padding:14px;cursor:pointer;display:grid;gap:8px;transition:.18s}.section-item:hover{transform:translateY(-1px);border-color:#b9d3ee}.section-item.active{background:#eaf3ff;border-color:#8fbeef;box-shadow:inset 4px 0 0 var(--blue)}.section-title{display:flex;justify-content:space-between;gap:10px;font-weight:900}.mini-line{display:flex;justify-content:space-between;color:var(--muted);font-size:13px}.pill{background:#fff;border:1px solid var(--line);padding:3px 8px;border-radius:999px;color:var(--blue);font-size:12px}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}.topbar h2{font-size:34px;letter-spacing:-1px}.total-box{background:#12213a;color:#fff;border-radius:20px;padding:12px 18px;min-width:160px;text-align:right}.total-box span{display:block;color:#afbdd0;font-size:12px}.total-box strong{font-size:26px}
.content-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(230px,1fr);gap:16px;margin-bottom:16px}.entry-card,.stats-card,.table-card{padding:16px}.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.game-form{display:grid;grid-template-columns:1fr 110px 120px 220px 140px;gap:12px;align-items:end}.choice-group{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.choice-group button{height:46px;border:1px solid var(--line);background:#fff;border-radius:14px;font-weight:900;cursor:pointer}.choice-group button.active{background:var(--blue);color:#fff;border-color:var(--blue)}
.stats-card{display:grid;gap:10px}.stat{display:flex;align-items:center;justify-content:space-between;background:var(--panel-soft);border:1px solid var(--line);border-radius:18px;padding:14px}.stat strong{font-size:24px}
.table-wrap{overflow:auto;border-radius:16px;border:1px solid var(--line)}table{width:100%;border-collapse:collapse;min-width:760px;background:#fff}th,td{padding:14px;text-align:left;border-bottom:1px solid var(--line);white-space:nowrap}th{background:#f4f9ff;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.06em}tr:last-child td{border-bottom:0}.pick-badge{display:inline-grid;place-items:center;min-width:34px;height:30px;border-radius:10px;background:#eaf3ff;color:var(--blue);font-weight:900}.delete-btn{border:0;background:#fff1f1;color:var(--red);border-radius:12px;height:34px;padding:0 10px;font-weight:800;cursor:pointer}.empty-row{text-align:center;color:var(--muted);padding:28px!important}
@media(max-width:980px){.app-shell{grid-template-columns:1fr;padding:10px}.left-panel,.right-panel{border-radius:22px}.content-grid{grid-template-columns:1fr}.game-form{grid-template-columns:1fr 1fr}.topbar h2{font-size:28px}}
@media(max-width:560px){.topbar{align-items:stretch;flex-direction:column}.total-box{text-align:left}.field-grid,.game-form{grid-template-columns:1fr}.choice-group{grid-template-columns:repeat(4,1fr)}.right-panel,.left-panel{padding:13px}.topbar h2{font-size:25px}table{min-width:680px}}
.side-summary{padding:14px;display:grid;gap:10px}.side-summary>div{display:flex;align-items:center;justify-content:space-between;background:var(--panel-soft);border:1px solid var(--line);border-radius:16px;padding:12px}.side-summary span{color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.side-summary strong{font-size:20px}.top-actions{display:flex;align-items:center;gap:12px}.section-select{height:54px;min-width:150px;font-weight:800;background:#fff}@media(max-width:560px){.top-actions{flex-direction:column;align-items:stretch}.section-select{width:100%}}

input[readonly]{background:#f8fafc;color:#12213a;font-weight:900;}
.choice-group{grid-template-columns:repeat(3,1fr)}
.system-card{padding:16px;margin-top:16px}
.system-controls{display:flex;align-items:center;gap:10px}
.system-controls label{margin:0}
.system-controls select{width:190px;height:42px;font-weight:800}
.system-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.system-summary>div{background:var(--panel-soft);border:1px solid var(--line);border-radius:16px;padding:12px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.system-summary span{color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.system-summary strong{font-size:20px}
.system-wrap table{min-width:900px}
@media(max-width:560px){.choice-group{grid-template-columns:repeat(3,1fr)}.system-summary{grid-template-columns:1fr}.system-controls{align-items:stretch;flex-direction:column}.system-controls select{width:100%}}


/* Professional system-combination tables */
.system-card .card-head h3{font-size:20px;}
.system-controls select{width:110px;text-align:center;}
#comboRows>tr>td{vertical-align:top;}
.inner-games-table{min-width:0;width:100%;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff;border-collapse:separate;border-spacing:0;}
.inner-games-table th,.inner-games-table td{padding:9px 10px;border-bottom:1px solid var(--line);white-space:nowrap;text-align:left;}
.inner-games-table th{background:#eef6ff;color:#516175;font-size:11px;}
.inner-games-table tr:last-child td{border-bottom:0;}
.system-wrap table{min-width:980px;}
.system-wrap>table>thead>tr>th:nth-child(3){min-width:330px;}

/* Popup combinations window */
.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(10,22,38,.52);
  display:grid;
  place-items:center;
  padding:18px;
  z-index:50;
}
.modal-backdrop.hidden{display:none;}
.modal-card{
  width:min(1180px,96vw);
  max-height:92vh;
  background:#fff;
  border:1px solid var(--line);
  border-radius:26px;
  box-shadow:0 30px 90px rgba(0,0,0,.28);
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.modal-head h3{font-size:28px;margin-top:4px;}
.close-btn{
  width:44px;
  height:44px;
  border:1px solid var(--line);
  background:#f7fbff;
  color:var(--text);
  border-radius:14px;
  font-size:28px;
  line-height:1;
  cursor:pointer;
}
.close-btn:hover{background:#eaf3ff;}
.modal-table-wrap{max-height:62vh;overflow:auto;}
.modal-table-wrap table{min-width:980px;}
.modal-table-wrap th,.modal-table-wrap td{vertical-align:top;}
#openCombosBtn:disabled{opacity:.55;cursor:not-allowed;background:#93a4b8;box-shadow:none;}
@media(max-width:560px){
  .modal-backdrop{padding:8px;place-items:start center;}
  .modal-card{width:100%;max-height:96vh;border-radius:20px;padding:12px;}
  .modal-head h3{font-size:22px;}
  .modal-table-wrap{max-height:66vh;}
}

/* Compact ticket popup */
.modal-card{
  width:min(820px,94vw);
  max-height:88vh;
  padding:14px;
  border-radius:22px;
}
.modal-head h3{font-size:22px;}
.modal-summary{margin-bottom:0;}
.ticket-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:10px;
  overflow:auto;
  max-height:58vh;
  padding:2px;
}
.ticket-card{
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 8px 18px rgba(31,64,104,.07);
}
.ticket-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:10px 12px;
  background:#f4f9ff;
  border-bottom:1px solid var(--line);
}
.ticket-head strong{font-size:14px;}
.ticket-head span{font-size:12px;color:var(--muted);font-weight:800;}
.ticket-games-table,
.ticket-total-table{
  min-width:0;
  width:100%;
  border-collapse:collapse;
  background:#fff;
}
.ticket-games-table th,
.ticket-games-table td,
.ticket-total-table th,
.ticket-total-table td{
  padding:8px 10px;
  border-bottom:1px solid var(--line);
  white-space:nowrap;
  font-size:13px;
}
.ticket-games-table th,
.ticket-total-table th{
  background:#fff;
  color:var(--muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.ticket-total-table th{text-align:left;width:50%;}
.ticket-total-table td{text-align:right;}
.ticket-games-table tr:last-child td,
.ticket-total-table tr:last-child th,
.ticket-total-table tr:last-child td{border-bottom:0;}
.empty-ticket{
  padding:20px;
  text-align:center;
  color:var(--muted);
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}
@media(max-width:560px){
  .modal-card{width:100%;max-height:94vh;padding:10px;border-radius:18px;}
  .ticket-list{grid-template-columns:1fr;max-height:62vh;}
  .modal-summary{grid-template-columns:1fr;}
}

.system-note{font-size:12px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;}

.ticket-win-footer{
  margin-top:8px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8fafc;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.ticket-win-footer span{
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.ticket-win-footer strong{
  font-size:18px;
  font-weight:950;
}

/* Cleaner generated ticket popup */
.modal-card{
  max-width:820px;
  background:#f8fbff;
}
.modal-summary{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}
.ticket-list{
  grid-template-columns:repeat(auto-fit, minmax(170px, 1fr));
  gap:10px;
}
.ticket-card{
  background:#eefbf2;
  border:1px solid #b9e7c4;
  box-shadow:0 8px 18px rgba(15,23,42,.08);
  padding:10px;
}
.ticket-card:nth-child(3n+2){background:#fff8df;border-color:#eadc9e;}
.ticket-card:nth-child(3n){background:#eef6ff;border-color:#bad7f5;}
.ticket-head.compact{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
  padding:0;
  border:0;
}
.ticket-head.compact strong{
  font-size:18px;
  line-height:1;
}
.ticket-head.compact b{
  font-size:17px;
  color:#0f172a;
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:6px 8px;
}
.ticket-games-table{
  background:#fff;
  border:1px solid #97a6ba;
  border-radius:10px;
  overflow:hidden;
}
.ticket-games-table th{
  background:#dfeaf7;
  color:#1e293b;
  font-size:11px;
  padding:7px 6px;
}
.ticket-games-table td{
  font-size:13px;
  padding:7px 6px;
  border-color:#cbd5e1;
}
.ticket-total-table,.ticket-win-footer{display:none!important;}
@media(max-width:560px){
  .modal-summary{grid-template-columns:1fr 1fr;}
  .ticket-list{grid-template-columns:1fr 1fr;}
  .ticket-card{padding:8px;}
  .ticket-head.compact b{font-size:14px;padding:5px 7px;}
}


/* Mobile-first cleanup: no bottom stats in left panel, clearer phone layout */
.left-panel .side-summary{display:none!important;}
.left-panel{gap:12px;}
.quick-form{margin-top:2px;}

@media(max-width:760px){
  body{background:#eef5fb;}
  .app-shell{
    min-height:100dvh;
    display:flex;
    flex-direction:column;
    gap:10px;
    padding:8px;
  }
  .left-panel,.right-panel{
    width:100%;
    border-radius:18px;
    padding:10px;
    box-shadow:0 8px 24px rgba(31,64,104,.10);
  }
  .brand{padding:2px 2px 6px;gap:10px;}
  .brand-mark{width:40px;height:40px;border-radius:13px;font-size:20px;}
  h1{font-size:20px;}
  .brand p{font-size:12px;}
  .quick-form{
    padding:10px;
    gap:9px;
    border-radius:16px;
  }
  input,select,.primary-btn,.ghost-btn{height:42px;border-radius:12px;font-size:15px;}
  .topbar{margin-bottom:10px;gap:10px;}
  .topbar h2{font-size:22px;}
  .total-box{border-radius:14px;padding:9px 12px;min-width:0;}
  .total-box strong{font-size:20px;}
  .content-grid{gap:10px;margin-bottom:10px;}
  .entry-card,.stats-card,.table-card,.system-card{padding:10px;border-radius:16px;}
  .card-head{margin-bottom:10px;}
  .card-head h3{font-size:17px;}
  .game-form{gap:9px;}
  .choice-group{gap:6px;}
  .choice-group button{height:42px;border-radius:12px;font-size:16px;}
  .stats-card{grid-template-columns:repeat(3,1fr);gap:6px;}
  .stat{display:grid;gap:4px;justify-items:center;text-align:center;padding:8px;border-radius:12px;}
  .stat span{font-size:10px;}
  .stat strong{font-size:16px;}
  .table-wrap{border-radius:12px;}
  table{min-width:620px;}
  th,td{padding:9px 8px;font-size:13px;}
  th{font-size:10px;}
  .system-summary{gap:6px;}
  .system-summary>div{padding:8px;border-radius:12px;}
  .system-summary span{font-size:10px;}
  .system-summary strong{font-size:16px;}
}

@media(max-width:420px){
  .app-shell{padding:6px;gap:8px;}
  .left-panel,.right-panel{padding:8px;border-radius:16px;}
  .brand-mark{width:36px;height:36px;}
  h1{font-size:18px;}
  .quick-form{padding:8px;}
  input,select,.primary-btn,.ghost-btn{height:40px;font-size:14px;}
  .topbar h2{font-size:20px;}
  .stats-card{grid-template-columns:1fr 1fr 1fr;}
  .stat strong{font-size:15px;}
  table{min-width:560px;}
  th,td{padding:8px 6px;font-size:12px;}
  .modal-backdrop{padding:6px;}
  .modal-card{width:100%;max-height:96dvh;padding:8px;border-radius:16px;}
  .ticket-list{grid-template-columns:1fr 1fr;gap:7px;max-height:66dvh;}
  .ticket-card{padding:7px;border-radius:12px;}
  .ticket-games-table th,.ticket-games-table td{padding:6px 4px;font-size:11px;}
  .ticket-head.compact strong{font-size:15px;}
  .ticket-head.compact b{font-size:12px;padding:4px 5px;}
}

@media(max-width:340px){
  .ticket-list{grid-template-columns:1fr;}
}

/* New professional ticket design */
.modal-card{
  max-width:760px;
  background:#f5f9ff;
  border-radius:22px;
  border:1px solid #d7e3f2;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
}
.modal-head{
  border-bottom:1px solid #d7e3f2;
  padding-bottom:10px;
}
.modal-head h3{
  font-size:22px;
  font-weight:950;
  color:#0f2847;
}
.modal-summary{
  display:none!important;
}
.ticket-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:12px;
  max-height:68vh;
  overflow:auto;
  padding:6px 2px 2px;
}
.ticket-card{
  background:#eaf7ef!important;
  border:2px solid #a7d8b2!important;
  border-radius:18px!important;
  padding:12px!important;
  box-shadow:0 12px 22px rgba(29,78,54,.12)!important;
}
.ticket-card:nth-child(3n+2){
  background:#fff6d9!important;
  border-color:#e7d184!important;
}
.ticket-card:nth-child(3n){
  background:#eaf3ff!important;
  border-color:#9fc5ee!important;
}
.ticket-head.compact{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  margin:0 0 10px!important;
  padding:0 0 8px!important;
  border-bottom:1px solid rgba(15,23,42,.14)!important;
}
.ticket-head.compact strong{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:#0f2847;
  color:#fff;
  font-size:16px!important;
  font-weight:950;
}
.ticket-head.compact b{
  background:#fff!important;
  border:1px solid rgba(15,23,42,.16)!important;
  border-radius:12px!important;
  padding:7px 10px!important;
  color:#0f2847!important;
  font-size:16px!important;
  font-weight:950;
  box-shadow:inset 0 -2px 0 rgba(15,23,42,.05);
}
.ticket-games-table{
  width:100%;
  border-collapse:separate!important;
  border-spacing:0!important;
  overflow:hidden!important;
  border-radius:13px!important;
  border:1px solid #7f91a8!important;
  background:#fff!important;
}
.ticket-games-table th{
  background:#d7e7f7!important;
  color:#172033!important;
  font-size:11px!important;
  font-weight:950!important;
  text-transform:uppercase;
  letter-spacing:.04em;
  padding:8px 6px!important;
  border-bottom:1px solid #7f91a8!important;
}
.ticket-games-table td{
  color:#0f172a!important;
  font-size:14px!important;
  font-weight:850!important;
  text-align:center!important;
  padding:8px 6px!important;
  border-right:1px solid #c3cfdd!important;
  border-bottom:1px solid #c3cfdd!important;
}
.ticket-games-table td:last-child,
.ticket-games-table th:last-child{border-right:0!important;}
.ticket-games-table tr:last-child td{border-bottom:0!important;}
.pick-badge{
  min-width:32px;
  display:inline-grid;
  place-items:center;
  border-radius:10px;
  padding:4px 8px;
  background:#0f2847;
  color:#fff;
  font-weight:950;
}
@media(max-width:560px){
  .modal-card{padding:10px!important;border-radius:18px!important;max-height:96dvh;}
  .modal-head h3{font-size:19px;}
  .ticket-list{grid-template-columns:1fr 1fr!important;gap:8px;max-height:74dvh;}
  .ticket-card{padding:8px!important;border-radius:14px!important;}
  .ticket-head.compact{margin-bottom:7px!important;padding-bottom:6px!important;}
  .ticket-head.compact strong{width:28px;height:28px;font-size:13px!important;border-radius:9px;}
  .ticket-head.compact b{font-size:12px!important;padding:5px 6px!important;border-radius:9px!important;}
  .ticket-games-table th{font-size:9px!important;padding:6px 3px!important;}
  .ticket-games-table td{font-size:11px!important;padding:6px 3px!important;}
  .pick-badge{min-width:24px;border-radius:8px;padding:3px 5px;}
}
@media(max-width:340px){.ticket-list{grid-template-columns:1fr!important;}}

/* Left panel live money standing */
.money-standing{
  padding:15px;
  display:grid;
  gap:12px;
}
.standing-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.standing-head h3{
  font-size:20px;
  letter-spacing:-.3px;
}
.standing-pill{
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:950;
  border:1px solid var(--line);
  background:#fff;
  color:var(--muted);
}
.standing-pill.good{background:#eafaf2;color:#057047;border-color:#b7e6cb;}
.standing-pill.risk{background:#fff1f1;color:#b42318;border-color:#ffd0d0;}
.standing-pill.neutral{background:#f4f9ff;color:#1f6feb;border-color:#cfe2ff;}
.standing-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.standing-box{
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--panel-soft);
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.standing-box span,
.standing-counts span,
.player-standing-meta span{
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.standing-box strong{
  font-size:22px;
  font-weight:950;
}
.standing-box.balance.profit strong{color:#067647;}
.standing-box.balance.loss strong{color:#b42318;}
.standing-counts{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
}
.standing-counts>div{
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:9px 7px;
  display:grid;
  gap:3px;
  text-align:center;
}
.standing-counts strong{
  font-size:18px;
  font-weight:950;
}
.player-standing-list{
  display:grid;
  gap:8px;
  max-height:300px;
  overflow:auto;
  padding-right:2px;
}
.player-standing-row{
  border:1px solid var(--line);
  background:#fff;
  border-radius:15px;
  padding:10px;
  display:grid;
  gap:7px;
}
.player-standing-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.player-standing-name{
  font-weight:950;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.player-state{
  border-radius:999px;
  padding:4px 8px;
  font-size:11px;
  font-weight:950;
  white-space:nowrap;
}
.player-state.win{background:#eafaf2;color:#057047;}
.player-state.lose{background:#fff1f1;color:#b42318;}
.player-state.pending{background:#f4f9ff;color:#1f6feb;}
.player-standing-meta{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:6px;
}
.player-standing-meta div{
  background:#f8fbff;
  border:1px solid #e5eef8;
  border-radius:11px;
  padding:7px 5px;
  display:grid;
  gap:2px;
  text-align:center;
}
.player-standing-meta strong{
  font-size:13px;
  font-weight:950;
}
.empty-standing{
  color:var(--muted);
  text-align:center;
  background:#f8fbff;
  border:1px dashed var(--line);
  border-radius:14px;
  padding:16px 10px;
  font-size:13px;
}
@media(max-width:760px){
  .money-standing{padding:10px;border-radius:16px;}
  .standing-grid{grid-template-columns:repeat(3,1fr);gap:6px;}
  .standing-box{display:grid;gap:4px;justify-items:center;text-align:center;padding:8px 5px;border-radius:12px;}
  .standing-box strong{font-size:15px;}
  .standing-box span,.standing-counts span,.player-standing-meta span{font-size:9px;}
  .player-standing-list{max-height:220px;}
}
@media(max-width:420px){
  .standing-head h3{font-size:17px;}
  .standing-grid{grid-template-columns:1fr;}
  .standing-box{display:flex;justify-items:normal;text-align:left;padding:9px;}
  .standing-box strong{font-size:17px;}
  .player-standing-meta strong{font-size:12px;}
}

/* Same game exposure in left panel */
.game-exposure{
  padding:15px;
  display:grid;
  gap:12px;
}
.exposure-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.exposure-head h3{
  font-size:20px;
  letter-spacing:-.3px;
}
.same-game-list{
  display:grid;
  gap:10px;
  max-height:360px;
  overflow:auto;
  padding-right:2px;
}
.same-game-card{
  border:1px solid #d7e3f2;
  background:#ffffff;
  border-radius:16px;
  padding:10px;
  display:grid;
  gap:9px;
  box-shadow:0 8px 18px rgba(31,64,104,.06);
}
.same-game-title{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.same-game-title strong{
  display:block;
  font-size:14px;
  font-weight:950;
  color:#0f2847;
}
.same-game-title span,
.same-game-total span,
.same-game-money span,
.same-game-note{
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.same-game-total{
  display:grid;
  gap:2px;
  text-align:right;
  white-space:nowrap;
}
.same-game-total b{
  font-size:15px;
  font-weight:950;
  color:#0f2847;
}
.choice-exposure-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:6px;
}
.choice-exposure{
  border:1px solid #e5eef8;
  background:#f8fbff;
  border-radius:12px;
  padding:7px 5px;
  display:grid;
  gap:2px;
  text-align:center;
}
.choice-exposure span{
  width:26px;
  height:24px;
  border-radius:8px;
  background:#0f2847;
  color:#fff;
  display:grid;
  place-items:center;
  justify-self:center;
  font-weight:950;
}
.choice-exposure b{
  font-size:12px;
  font-weight:950;
}
.choice-exposure em{
  font-style:normal;
  font-size:11px;
  font-weight:950;
}
.choice-exposure.good em{color:#067647;}
.choice-exposure.risk em{color:#b42318;}
.choice-exposure.neutral em{color:#64748b;}
.same-game-players{
  display:grid;
  gap:6px;
}
.same-game-player-row{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) auto auto;
  gap:6px;
  align-items:center;
  border:1px solid #e5eef8;
  background:#f8fbff;
  border-radius:12px;
  padding:7px;
}
.same-game-player-row strong{
  display:block;
  font-size:13px;
  font-weight:950;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.same-game-player-row span{
  display:block;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}
.same-game-player-row span b{
  color:#0f2847;
  font-weight:950;
}
.same-game-money{
  display:grid;
  gap:1px;
  text-align:right;
  white-space:nowrap;
}
.same-game-money b{
  font-size:12px;
  font-weight:950;
  color:#0f2847;
}
@media(max-width:760px){
  .game-exposure{padding:10px;border-radius:16px;}
  .same-game-list{max-height:260px;}
  .same-game-player-row{grid-template-columns:1fr 1fr;}
  .same-game-player-row>div:first-child{grid-column:1/-1;}
  .same-game-money{text-align:left;}
}
@media(max-width:420px){
  .exposure-head h3{font-size:17px;}
  .choice-exposure-grid{grid-template-columns:1fr;}
}

/* Left panel combinations/permutations calculator */
.combo-calculator{
  padding:15px;
  display:grid;
  gap:12px;
}
.calc-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.calc-head h3{
  font-size:20px;
  letter-spacing:-.3px;
}
.calc-quick{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
}
.calc-quick button{
  height:38px;
  border:1px solid #cfe2ff;
  background:#f4f9ff;
  color:#1f6feb;
  border-radius:12px;
  font-weight:950;
  cursor:pointer;
}
.calc-quick button:hover{
  background:#eaf3ff;
}
.calc-fields{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}
.calc-fields input{
  height:42px;
  font-weight:950;
  text-align:center;
}
.calc-results{
  display:grid;
  gap:8px;
}
.calc-results>div{
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--panel-soft);
  padding:10px;
  display:grid;
  gap:3px;
}
.calc-results span{
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.calc-results strong{
  font-size:22px;
  font-weight:950;
  color:#0f2847;
  word-break:break-word;
}
.calc-results em,
.calc-formula{
  font-style:normal;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}
.calc-formula{
  border:1px dashed var(--line);
  border-radius:13px;
  background:#fff;
  padding:10px;
  text-align:center;
}
@media(max-width:760px){
  .combo-calculator{padding:10px;border-radius:16px;}
  .calc-results strong{font-size:17px;}
}
@media(max-width:420px){
  .calc-head h3{font-size:17px;}
  .calc-fields{grid-template-columns:1fr;}
}

/* FINAL FIX: generated tickets must be clear cards, not stacked strips */
#comboModal .modal-card{
  width:min(1120px,96vw)!important;
  max-width:none!important;
  max-height:94dvh!important;
  overflow:hidden!important;
  background:#f6faff!important;
}
#comboModal .ticket-list{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(285px,1fr))!important;
  align-items:start!important;
  gap:14px!important;
  max-height:72dvh!important;
  overflow:auto!important;
  padding:8px!important;
}
#comboModal .ticket-card{
  display:block!important;
  min-height:auto!important;
  height:auto!important;
  overflow:visible!important;
  border-radius:20px!important;
  padding:14px!important;
  background:#ffffff!important;
  border:1px solid #cfe0f2!important;
  box-shadow:0 12px 28px rgba(15,35,60,.12)!important;
}
#comboModal .ticket-card:nth-child(3n+1){border-top:6px solid #81d49a!important;}
#comboModal .ticket-card:nth-child(3n+2){border-top:6px solid #f2cf5b!important;}
#comboModal .ticket-card:nth-child(3n){border-top:6px solid #86bef8!important;}
#comboModal .ticket-head.compact{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin:0 0 12px!important;
  padding:0 0 12px!important;
  border-bottom:1px solid #dbe7f2!important;
}
.ticket-number-block{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
}
#comboModal .ticket-number-block strong{
  width:42px!important;
  height:42px!important;
  flex:0 0 42px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:13px!important;
  background:#0e315b!important;
  color:#fff!important;
  font-size:16px!important;
  font-weight:950!important;
}
.ticket-number-block span{
  font-size:15px!important;
  font-weight:950!important;
  color:#0f2847!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.ticket-win-block{
  display:grid!important;
  justify-items:end!important;
  gap:3px!important;
  text-align:right!important;
}
.ticket-win-block small{
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.06em!important;
  text-transform:uppercase!important;
  color:#6c7b8d!important;
}
#comboModal .ticket-win-block b{
  background:#eef6ff!important;
  border:1px solid #cfe0f2!important;
  border-radius:13px!important;
  padding:7px 10px!important;
  color:#0e315b!important;
  font-size:17px!important;
  font-weight:950!important;
  white-space:nowrap!important;
}
#comboModal .ticket-games-table{
  display:table!important;
  width:100%!important;
  table-layout:fixed!important;
  margin:0!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  border:1px solid #cddceb!important;
  border-radius:14px!important;
  overflow:hidden!important;
  background:#fff!important;
}
#comboModal .ticket-games-table th,
#comboModal .ticket-games-table td{
  display:table-cell!important;
  text-align:center!important;
  white-space:nowrap!important;
  padding:9px 6px!important;
  border-bottom:1px solid #e5edf6!important;
}
#comboModal .ticket-games-table th{
  background:#eef6ff!important;
  color:#53657b!important;
  font-size:11px!important;
  font-weight:950!important;
}
#comboModal .ticket-games-table td{
  color:#10243a!important;
  font-size:14px!important;
  font-weight:850!important;
}
#comboModal .ticket-games-table tr:last-child td{border-bottom:0!important;}
.ticket-bottom{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
  margin-top:12px!important;
}
.ticket-bottom div{
  background:#f8fbff!important;
  border:1px solid #dbe7f2!important;
  border-radius:14px!important;
  padding:9px!important;
  display:grid!important;
  gap:3px!important;
}
.ticket-bottom span{
  color:#6c7b8d!important;
  font-size:10px!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.05em!important;
}
.ticket-bottom strong{
  color:#0f2847!important;
  font-size:15px!important;
  font-weight:950!important;
}
@media(max-width:760px){
  #comboModal .modal-card{width:100%!important;max-height:96dvh!important;padding:10px!important;}
  #comboModal .ticket-list{grid-template-columns:1fr!important;gap:10px!important;max-height:75dvh!important;padding:4px!important;}
  #comboModal .ticket-card{padding:12px!important;border-radius:18px!important;}
}
