/* Personal account history. No calculations or state are performed by this layer. */
.history-surface{--bh-amber:#ffbf86;--bh-mint:#b9efd6;--bh-coral:#efb2a7;min-width:0}
.history-account{display:flex;align-items:center;gap:15px;min-width:0;margin-bottom:20px;padding:20px 22px;border:1px solid #dda66d69;border-radius:18px;background:linear-gradient(180deg,#ffe0b410,transparent 60%),linear-gradient(110deg,#74513c40,#203b51 55%,#244b4699);box-shadow:inset 0 1px #ffe5be3b,0 4px 0 #07182b80,0 12px 30px #07152b26}
.history-account>.pf-avatar{width:52px;height:52px;flex-shrink:0}
.history-account>div,.history-account>span:not(.pf-avatar){min-width:0}
.history-account strong{display:block;color:#fff0de;font:650 20px/1.35 var(--font-control,"Rubik",sans-serif);overflow-wrap:anywhere}
.history-account small{display:block;margin-top:4px;color:#aac0d2;font-size:13px;line-height:1.4}
.history-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-bottom:23px;min-width:0}
.history-summary-card{--bh-tone:#f5ce9f;position:relative;min-width:0;padding:19px 20px;border:1px solid #9a94745e;border-radius:14px;background:linear-gradient(180deg,#ffe0b90e,transparent 40%,#06162b2e),#21394d;box-shadow:inset 3px 0 #efac6c99,inset 0 1px #ffe0b833,0 4px 0 #07182c66}
.history-summary-card.tone-win{--bh-tone:#b9efd6;border-color:#a0d9bb55;box-shadow:inset 3px 0 #a8e6c48c,inset 0 1px #c9ffe52b,0 4px 0 #07182c66;background:linear-gradient(180deg,#a8e6c40d,transparent 48%,#06162b2e),#203d49}
.history-summary-card.tone-loss{--bh-tone:#efb2a7;border-color:#d49c8f5c;box-shadow:inset 3px 0 #e8a28f99,inset 0 1px #ffdbcc26,0 4px 0 #07182c66;background:linear-gradient(180deg,#f0ac920b,transparent 48%,#06162b2e),#323c49}
.history-summary-card.tone-neutral{--bh-tone:#e0d7c7}
.history-summary-card>small{display:block;color:#b0c2d2;font-size:13px;line-height:1.4}
.history-summary-card>strong{display:block;min-width:0;margin-top:8px;color:var(--bh-tone);font:750 clamp(23px,2.1vw,31px)/1.2 var(--font-control,"Rubik",sans-serif);font-variant-numeric:tabular-nums;letter-spacing:-.5px;overflow-wrap:anywhere}
.history-summary-card .status,.history-summary-card>.history-summary-status{display:block;margin-top:9px;color:#95afc3;font-size:12px;line-height:1.4}
.history-filters,.history-filters.subnav{display:flex;gap:7px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;min-width:0;margin:0 0 21px;padding:4px 3px 9px;border:0}
.history-filters::-webkit-scrollbar{display:none}
.history-filters button{flex-shrink:0;min-height:42px;padding:9px 14px;border:1px solid #6d8da34d;border-radius:10px;background:linear-gradient(180deg,#ffffff07,transparent),#1b354b;color:#abc2d5;font-size:14px;line-height:1.35}
.history-filters button.active{color:#ffe0b5;border-color:#f3b4769c;background:linear-gradient(180deg,#ffe0ad1a,transparent 65%),linear-gradient(120deg,#835b3f73,#344e60);box-shadow:inset 0 1px #ffdeaa5c,0 3px 0 #07182c66}
.history-filters button:focus-visible{outline:2px solid #ffce98;outline-offset:3px}

.history-surface .bet-card{--bh-tone:#e9caab;--bh-rgb:245,185,128;--bh-edge:#bb95765e;position:relative;isolation:isolate;overflow:hidden;min-width:0;margin-bottom:18px;padding:23px;border:1px solid var(--bh-edge);border-radius:18px;background:linear-gradient(180deg,#ffe5ba0c,transparent 29%,#04132620),#1d364c;box-shadow:inset 4px 0 rgba(var(--bh-rgb),.54),inset 0 1px #f5e2c32b,0 4px 0 #07172b80,0 12px 30px #06142724}
.history-surface .bet-card.result-win{--bh-tone:#b9efd6;--bh-rgb:165,230,194;--bh-edge:#a2d7bb73;background:linear-gradient(180deg,#a3e3bd0c,transparent 45%,#04132622),#1e3a47}
.history-surface .bet-card.result-loss{--bh-tone:#efb2a7;--bh-rgb:234,160,143;--bh-edge:#d89b8c69;background:linear-gradient(180deg,#e7a18d0b,transparent 45%,#04132622),#293847}
.history-surface .bet-card.result-pending{--bh-tone:#ffcb95;--bh-rgb:255,183,113;--bh-edge:#e4ac7073}
.history-surface .bet-card.result-neutral{--bh-tone:#d5d5d0;--bh-rgb:167,187,196;--bh-edge:#8fa8b65c}
.history-surface .bet-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;min-width:0;margin-bottom:16px}
.history-surface .bet-header>div{display:flex;flex-direction:column;align-items:flex-start;min-width:0;flex:1}
.history-surface .bet-header strong{display:block;font:650 19px/1.35 var(--font-control,"Rubik",sans-serif);color:#fff0dd;overflow-wrap:anywhere}
.history-surface .bet-header strong .muted{font-weight:500;font-size:13px;color:#8eaac1}
.history-surface .bet-header small{display:block;margin-top:6px;font-size:13px;line-height:1.5;color:#98b1c5}
.history-cycle,.history-cyclepill,.history-cycle-pill{display:inline-flex;align-items:center;min-height:25px;padding:4px 7px;margin-top:6px;border:1px solid #91acbe38;border-radius:6px;background:#0e273b52;color:#acbdc8;font-size:11px;line-height:1.3}
.history-surface .bet-header .chip{max-width:100%;white-space:normal;color:var(--bh-tone);border:1px solid rgba(var(--bh-rgb),.32);background:rgba(var(--bh-rgb),.08);font-size:12px}
.history-surface .bet-leg{display:flex;justify-content:space-between;align-items:center;gap:13px;flex-wrap:wrap;min-width:0;padding:16px 0;border-top:1px solid #b9cdd51c;color:#e5e8e4;font-size:15px;line-height:1.5}
.history-surface .bet-leg>div{flex:1 1 160px;min-width:0}
.history-surface .bet-leg p{color:#b8c8d3;font-size:14px;line-height:1.5;margin-top:6px;overflow-wrap:anywhere}
.history-surface .bet-leg>strong{flex-shrink:0;align-self:center;color:#ffd0a0;font:750 23px/1.2 var(--font-control,"Rubik",sans-serif);font-variant-numeric:tabular-nums}
.history-surface .bet-leg .chip{font-size:11px;line-height:1.4;max-width:100%;white-space:normal}
.history-clubs{display:inline-flex;align-items:center;gap:8px;vertical-align:middle;width:88px;min-width:88px;flex-shrink:0}
.history-clubs img{width:40px;height:40px;object-fit:contain;flex-shrink:0;margin:0}
.history-surface .bet-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;min-width:0;border-top:1px solid #94b0c12b;padding:17px 0 0;margin-top:1px;color:#95afc3;font-size:13px;line-height:1.4}
.history-surface .bet-meta>*{min-width:0}
.history-surface .bet-meta strong{display:block;margin:7px 0 0;color:#e9e9df;font:650 20px/1.3 var(--font-control,"Rubik",sans-serif);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.history-surface .bet-outcome{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0;margin-top:19px;padding:15px 16px;border:1px solid rgba(var(--bh-rgb),.25);border-radius:12px;background:linear-gradient(180deg,rgba(var(--bh-rgb),.06),transparent),#102b3d73;box-shadow:inset 0 1px rgba(var(--bh-rgb),.1)}
.history-surface .bet-outcome::before{content:"↺";display:grid;place-items:center;flex-shrink:0;width:28px;height:28px;border-radius:8px;border:1px solid rgba(var(--bh-rgb),.3);background:rgba(var(--bh-rgb),.06);color:var(--bh-tone);font:650 17px/1 var(--font-control,"Rubik",sans-serif)}
.history-surface .result-win .bet-outcome::before{content:"✓"}
.history-surface .result-loss .bet-outcome::before{content:"−"}
.history-surface .result-pending .bet-outcome::before{content:"…"}
.history-surface .bet-outcome>span{flex:1;min-width:0;font-size:14px;line-height:1.4;color:#b2c4cf}
.history-surface .bet-outcome-value{margin-left:auto;color:var(--bh-tone);font:750 clamp(24px,2.3vw,30px)/1.15 var(--font-control,"Rubik",sans-serif);font-variant-numeric:tabular-nums;letter-spacing:-.4px;overflow-wrap:anywhere}
.history-surface .bet-card>footer,.history-surface .bet-foot,.history-surface .history-cycle-label{display:block;margin-top:13px;color:#89a4b9;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.history-surface .bet-card::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;border-radius:inherit;opacity:0;background:linear-gradient(135deg,transparent 5%,rgba(var(--bh-rgb),.16) 42%,transparent 75%);box-shadow:inset 0 0 0 2px rgba(var(--bh-rgb),.6)}
@keyframes bh-settlement{0%{opacity:0}25%{opacity:.65}100%{opacity:0}}
@media(prefers-reduced-motion:no-preference){.history-surface .bet-card.settlement-flash::after{animation:bh-settlement .45s ease-out 1}}
body.motion-enabled .history-surface .bet-card.settlement-flash::after{animation:bh-settlement .45s ease-out 1}
body.motion-paused .history-surface .bet-card.settlement-flash::after{animation:none}
@media(max-width:760px){.history-overview{gap:10px}.history-summary-card{padding:16px}.history-summary-card>strong{font-size:25px}.history-surface .bet-card{padding:20px}}
@media(max-width:620px){
  .history-account{padding:17px;gap:12px;margin-bottom:17px}.history-account>.pf-avatar{width:45px;height:45px}.history-account strong{font-size:18px}.history-account small{font-size:12px}
  .history-overview{grid-template-columns:1fr;gap:10px;margin-bottom:18px}.history-summary-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:7px 12px;padding:15px 17px}.history-summary-card>strong{margin:0;font-size:26px;text-align:right;max-width:200px}.history-summary-card .status,.history-summary-card>.history-summary-status{grid-column:1/-1;margin:0;font-size:12px}
  .history-filters,.history-filters.subnav{gap:6px;margin-bottom:16px}.history-filters button{font-size:13px;min-height:41px;padding:9px 12px}
  .history-surface .bet-card{padding:18px 16px;margin-bottom:16px;border-radius:15px}.history-surface .bet-header{gap:10px;margin-bottom:12px}.history-surface .bet-header strong{font-size:18px}.history-surface .bet-header small{font-size:12px}.history-surface .bet-header .chip{font-size:11px}
  .history-surface .bet-leg{gap:10px;padding:14px 0;font-size:14px}.history-surface .bet-leg:has(>.history-clubs){display:grid;grid-template-columns:72px minmax(0,1fr) auto}.history-surface .bet-leg p{font-size:13px}.history-surface .bet-leg>strong{font-size:22px}.history-clubs{gap:8px;width:72px;min-width:72px}.history-clubs img{width:32px;height:32px}
  .history-surface .bet-meta{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;padding-top:15px;font-size:12px}.history-surface .bet-meta>:last-child{grid-column:1/-1}.history-surface .bet-meta strong{font-size:20px;margin-top:5px}
  .history-surface .bet-outcome{padding:14px 12px;gap:10px;margin-top:16px}.history-surface .bet-outcome>span{font-size:13px}.history-surface .bet-outcome-value{font-size:26px}.history-surface .bet-outcome::before{width:25px;height:25px;font-size:16px}
}
@media(max-width:380px){.history-summary-card>strong{font-size:23px;max-width:155px}.history-surface .bet-header>div{flex-basis:100%}.history-surface .bet-outcome-value{flex-basis:100%;padding-left:35px;margin:0;font-size:25px}}
.history-cycle-select{display:block;margin-bottom:18px;max-width:320px}.bet-history-more{display:flex;gap:18px;align-items:center;justify-content:center;padding:15px 0 25px;flex-wrap:wrap}.pf-history-button{margin-top:18px;width:100%}
.toast.settlement-win{background:#183e35;border-color:#8ee0b7;color:#d6ffe7;box-shadow:0 10px 40px #54bd871f}.toast.settlement-loss{background:#443039;border-color:#e29a8d;color:#ffdad3}.toast.settlement-neutral{background:#263d50;border-color:#8faac1;color:#e2edf3}
body.motion-enabled .history-surface .bet-card.settlement-flash::after{animation:bh-settlement .45s ease-out 1!important}body.motion-paused .history-surface .bet-card.settlement-flash::after{animation:none!important}
