:root {
      --bg-body: #eef2f6;
      --bg-card: #ffffff;
      --border: #e2e8f0;
      --header-bg: #0f172a; 
      --text-main: #0f172a;
      --text-muted: #64748b;
      --btn-bg: #f8fafc;
      --btn-border: #cbd5e1;
      --mandarina: #ff7a00;
      --mandarina-hover: #e66e00;
      --green: #10b981;
      --red: #ef4444;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; -webkit-tap-highlight-color: transparent; }
    body { background: var(--bg-body); color: var(--text-main); -webkit-font-smoothing: antialiased; }

    .sticky-wrapper { position: sticky; top: 0; z-index: 999; width: 100%; }

    .notch-bar {
      background: #000000;
      height: 42px;
      width: 100%;
      display: none;
    }

    header {
      background: var(--header-bg); border-bottom: 3px solid var(--mandarina);
      padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; color: #fff;
    }
    .brand { font-size: 18px; font-weight: 900; letter-spacing: -0.5px; }
    .brand span { color: var(--mandarina); }
    .balance-pill { 
      background: #fff; color: var(--header-bg); padding: 4px 10px; 
      border-radius: 20px; font-size: 12px; font-weight: 800; 
      display: flex; align-items: center; gap: 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    @keyframes pulse-btn {
      0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,122,0,0.7); }
      70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(255,122,0,0); }
      100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,122,0,0); }
    }

    .btn-install-banner {
      display: none;
      background: linear-gradient(135deg, #ff7a00, #ff9431);
      color: #fff;
      font-weight: 900;
      font-size: 13px;
      text-align: center;
      padding: 12px;
      margin: 12px auto 4px auto;
      max-width: 1100px;
      border-radius: 8px;
      box-shadow: 0 4px 10px rgba(255,122,0,0.4);
      cursor: pointer;
      border: none;
      width: calc(100% - 24px);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      animation: pulse-btn 2s infinite;
    }

    .mobile-ticket-bar {
      display: none; background: #ffffff; border-bottom: 1px solid var(--border);
      padding: 8px 12px; align-items: center; justify-content: space-between; gap: 8px;
      box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    }
    .mob-info { display: flex; flex-direction: column; }
    .mob-picks { font-size: 11px; font-weight: 800; color: var(--text-muted); }
    .mob-payout-text { font-size: 13px; font-weight: 900; color: var(--text-main); margin-top: 1px; }
    .mob-payout-text span { color: var(--mandarina); font-size: 15px; }
    
    .mob-actions { display: flex; align-items: center; gap: 8px; }
    .mob-stake-box { display: flex; flex-direction: column; align-items: center; }
    .mob-stake-box label { font-size: 9px; font-weight: 800; color: var(--text-muted); margin-bottom: 2px; }
    
    .mini-stake {
      width: 60px; height: 30px; border: 2px solid var(--btn-border); border-radius: 6px;
      text-align: center; font-weight: 900; font-size: 13px; outline: none; color: var(--text-main);
    }
    .mini-stake:focus { border-color: var(--mandarina); }
    
    .btn-mob-sellar {
      background: var(--header-bg); color: #fff; border: none; padding: 0 10px; height: 30px; margin-top: 13px;
      border-radius: 6px; font-weight: 800; font-size: 11px; cursor: pointer; white-space: nowrap;
    }

    .app-layout { max-width: 1100px; margin: 8px auto; padding: 0 6px 50px 6px; display: grid; grid-template-columns: 1fr 320px; gap: 12px; }

    .league-section { background: var(--bg-body); margin-bottom: 12px;}
    .league-header {
      background: var(--header-bg); padding: 10px 12px; font-size: 13px; font-weight: 800;
      color: #ffffff; display: flex; justify-content: space-between; align-items: center;
      border-radius: 6px; cursor: pointer; margin-bottom: 8px; text-transform: uppercase;
    }
    .board-container { transition: max-height 0.3s; }
    .board-container.collapsed { display: none; }

    .game-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); overflow: hidden; }
    .slice-top { background: var(--header-bg); padding: 6px 10px; font-size: 11px; font-weight: 700; color: #fff; display: flex; justify-content: space-between; align-items: center;}
    
    .slice-grid { display: grid; grid-template-columns: 1fr 80px; gap: 4px 8px; padding: 8px 10px; align-items: center; }
    .col-title { font-size: 9px; font-weight: 800; color: var(--text-muted); text-align: center; text-transform: uppercase; }
    .team-row { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 900; color: var(--text-main); }
    .team-logo { width: 18px; height: 18px; object-fit: contain; }

    .btn-bet {
      background: var(--btn-bg); border: 1px solid var(--btn-border); border-radius: 6px;
      height: 38px; display: flex; flex-direction: column; align-items: center; justify-content: center;
      cursor: pointer; transition: 0.1s; width: 100%; padding: 2px;
    }
    .btn-bet .odd-only { font-size: 14px; font-weight: 900; color: var(--mandarina); }
    
    .btn-bet:active { transform: scale(0.95); background: #e2e8f0; }
    .btn-bet.active { background: var(--mandarina) !important; border-color: var(--mandarina-hover) !important; }
    .btn-bet.active .odd-only { color: #fff !important; }
    .btn-bet:disabled, .btn-exp:disabled { opacity: 0.5; cursor: not-allowed !important; background: #f1f5f9 !important; border-color: var(--btn-border) !important; }

    .slice-bottom { border-top: 1px solid var(--border); background: #fcfdfd; }
    .btn-more { width: 100%; background: none; border: none; padding: 10px; font-size: 11px; font-weight: 900; color: var(--mandarina); cursor: pointer; text-transform: uppercase; }

    .expanded-markets { display: none; background: #f8fafc; padding: 14px; border-top: 1px solid var(--border); }
    .exp-section { margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
    .exp-section:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
    .exp-title { font-size: 11px; text-transform: uppercase; font-weight: 900; color: var(--text-main); margin-bottom: 10px; display: block; letter-spacing: 0.5px; }
    .exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
    /* ESTA FALTABA PARA EL 5TO INNING */
    .exp-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }     
    /* ESTILOS PARA EL CANDADO PWA (agrégalos también) */
    #bloqueo-pwa { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-body); z-index: 9999; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; }
    #bloqueo-pwa h2 { color: var(--header-bg); margin-bottom: 10px; font-weight: 900;}
    #bloqueo-pwa p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; font-weight: 600;}
    
    .btn-exp {
      background: #fff; border: 1px solid var(--btn-border); border-radius: 6px; padding: 10px;
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      cursor: pointer; text-align: center; min-height: 44px;
    }
    .btn-exp .exp-lbl { color: var(--text-muted); font-weight: 800; font-size: 11px; margin-bottom: 4px; line-height: 1.2; }
    .btn-exp .exp-odd { color: var(--mandarina); font-weight: 900; font-size: 14px; }
    
    .btn-exp.active { background: var(--mandarina); border-color: var(--mandarina); }
    .btn-exp.active .exp-lbl, .btn-exp.active .exp-odd { color: #fff; }

    .scoreboard-container { 
      width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; 
      background: var(--bg-card); border-top: 1px solid var(--border);
    }
    .scoreboard { width: 100%; border-collapse: collapse; text-align: center; font-size: 13px; min-width: 320px; }
    .scoreboard th, .scoreboard td { padding: 8px 6px; border-bottom: 1px solid var(--border); border-right: 1px solid #f3f4f6; }
    .scoreboard th { font-weight: 800; color: var(--text-muted); font-size: 11px; background: #f8fafc; }
    .scoreboard td { font-weight: 800; color: var(--text-main); }
    .scoreboard tr:last-child td { border-bottom: none; }
    
    .scoreboard .sc-team { 
      text-align: left; position: sticky; left: 0; background: var(--bg-card); 
      border-right: 1px solid var(--border); padding-left: 12px; min-width: 90px; z-index: 2;
    }
    .scoreboard .sc-team div { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
    
    .sc-total-col { border-left: 1px solid var(--border); border-right: none !important; }
    .sc-total { background: var(--header-bg); color: #fff; padding: 4px 8px; border-radius: 4px; font-weight: 900; font-size: 13px; display: inline-block;}
    .team-logo-small { width: 18px; height: 18px; object-fit: contain; }
    .inn-empty { background: #f8fafc !important; color: transparent !important; }

    aside { scroll-margin-top: 100px; }
    .ticket-drawer { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 14px; position: sticky; top: 90px; }
    .ticket-head { display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 8px; font-size: 14px; font-weight: 900; color: var(--header-bg); }
    
    .stake-container { padding: 10px 0; border-bottom: 1px dashed var(--border); display: flex; align-items: center; justify-content: space-between; }
    .stake-container span { font-size: 12px; font-weight: 800; color: var(--text-muted); }
    .desk-stake { width: 80px; text-align: right; border: 2px solid var(--border); border-radius: 4px; padding: 6px; font-weight: 900; font-size: 14px; outline: none; }
    .desk-stake:focus { border-color: var(--mandarina); }

    .ticket-item { background: var(--btn-bg); border-radius: 4px; padding: 10px; margin-top: 8px; position: relative; border: 1px solid var(--btn-border); }
    .ticket-item .del { position: absolute; right: 8px; top: 6px; color: var(--red); cursor: pointer; font-size: 16px; font-weight: bold; }
    .ticket-item .t-lbl { font-weight: 800; color: var(--text-main); font-size: 12px; padding-right: 15px; line-height: 1.3;}
    .ticket-item .t-odd { color: var(--mandarina); font-weight: 900; margin-top: 5px; font-size: 13px; }
    
    .payout-box { background: #fff4ec; border: 1px dashed var(--mandarina); border-radius: 4px; padding: 10px; text-align: center; margin: 12px 0; }
    .payout-box small { font-size: 10px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; }
    .payout-box div { font-size: 20px; font-weight: 900; color: var(--mandarina); }
    .btn-sellar { width: 100%; background: var(--mandarina); color: #fff; border: none; padding: 12px; border-radius: 4px; font-weight: 900; font-size: 13px; cursor: pointer; text-transform: uppercase; }

    @media (max-width: 850px) {
      .app-layout { grid-template-columns: 1fr; }
      .mobile-ticket-bar.show { display: flex; }
      .ticket-drawer { position: static; margin-top: 10px; }
    }