/* イベント差し込み (operators) */
.tfe-modal{position:fixed;inset:0;z-index:90;background:rgba(0,0,0,.62);display:flex;align-items:center;justify-content:center;padding:12px;color:#fff}
.tfe-box{background:#0f1a33;border:1px solid #d08a2a;border-radius:14px;width:min(1080px,100%);max-height:calc(100dvh - 24px);display:flex;flex-direction:column;gap:6px;padding:12px 14px;box-shadow:0 10px 40px rgba(0,0,0,.5)}
.tfe-h{display:flex;align-items:center;gap:10px}
.tfe-h b{font-size:18px}
.tfe-h .tag{font-size:11px;background:#5a1a1a;border-radius:6px;padding:2px 6px}
.tfe-h>button{margin-left:auto}
.tfe-box button{font:inherit;color:#fff;background:#1c2d52;border:1px solid #3a5586;border-radius:8px;padding:6px 10px;cursor:pointer;font-weight:700}
.tfe-box button:disabled{opacity:.5;cursor:default}
.tfe-box input,.tfe-box select{font:inherit;color:#fff;background:#0a1328;border:1px solid #3a5586;border-radius:8px;padding:6px 8px;width:100%;min-width:0}
.tfe-box small{font-size:11px;opacity:.72;line-height:1.4}
.tfe-box small.warn{color:#ffcf7a;opacity:1}
.tfe-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:12px;min-height:0;flex:1}
.tfe-l{overflow:auto;min-height:0;padding-right:4px}
.tfe-r{overflow:auto;min-height:0;display:flex;flex-direction:column;gap:8px}
.tfe-r h4{margin:6px 0 0;font-size:13px;opacity:.85}
.tfe-form{display:flex;flex-direction:column;gap:10px}
.tfe-f{display:flex;flex-direction:column;gap:4px}
.tfe-f>span{font-weight:800;font-size:13px;color:#ffd79a}
.tfe-row2{display:grid;grid-template-columns:1fr 1.4fr;gap:10px}
.tfe-chips{display:flex;flex-wrap:wrap;gap:5px}
.tfe-chips button{padding:5px 9px;font-size:13px;display:flex;flex-direction:column;align-items:center;line-height:1.2}
.tfe-chips button small{font-size:10px;font-weight:600}
.tfe-chips button.on,.tfe-tr.on .pick{background:#6a4210;border-color:#ffb547;box-shadow:0 0 0 2px rgba(255,181,71,.25)}
.tfe-prizes{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}
.tfe-prizes label{display:flex;flex-direction:column;font-size:11px;gap:2px;opacity:.9}
.tfe-check{display:flex;gap:8px;align-items:center;font-size:13px}
.tfe-check input{width:auto}
.tfe-tracks{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:5px;max-height:220px;overflow:auto;padding:2px}
.tfe-th{grid-column:1/-1;font-size:11px;font-weight:800;opacity:.75;margin-top:4px}
.tfe-tr{display:flex;gap:4px}
.tfe-tr .pick{flex:1;display:flex;justify-content:space-between;gap:6px;font-size:12px;padding:6px 8px;min-width:0}
.tfe-tr .pick b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tfe-tr .play{padding:6px 8px;font-size:11px}
.tfe-pv{border:1px solid #d08a2a;border-radius:12px;padding:10px;background:rgba(208,138,42,.1);display:flex;flex-direction:column;gap:6px}
.tfe-pv.ng{border-color:#c44;background:rgba(200,60,60,.12)}
.tfe-pv-h{font-size:17px;font-weight:900}
.tfe-pv .kv{display:grid;grid-template-columns:auto 1fr;gap:3px 10px;font-size:13px}
.tfe-pv .kv span{opacity:.75}
.tfe-pv .kv small{margin-left:4px}
.tfe-closed{display:flex;flex-wrap:wrap;gap:4px;font-size:12px;font-weight:700}
.tfe-closed span{background:#4a1f1f;border:1px solid #a44;border-radius:6px;padding:2px 6px}
.tfe-box .go{background:#b8650f;border-color:#ffb547;font-size:15px;padding:9px 14px}
.tfe-box .go.wide{width:100%}
.tfe-box .danger{background:#7a1f1f;border-color:#d55}
.tfe-sure{border:1px dashed #ffb547;border-radius:10px;padding:8px;display:flex;flex-direction:column;gap:6px}
.tfe-sure .btns{display:flex;gap:6px}
.tfe-msg{border-radius:8px;padding:6px 8px;font-size:12px;font-weight:800}
.tfe-msg.ok{background:#1f4a2a;color:#c8ffd6}.tfe-msg.ng{background:#5a1a1a;color:#ffd0d0}
.tfe-list{display:flex;flex-direction:column;gap:5px}
.tfe-ev{display:flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.14);border-radius:8px;padding:6px 8px;font-size:13px}
.tfe-ev>div{flex:1;display:flex;flex-direction:column;min-width:0}
.tfe-ev.cancelled{opacity:.5}
.tfe-st{font-size:11px;font-weight:800;background:#23365f;border-radius:6px;padding:2px 6px;white-space:nowrap}
.tfe-ev.betting .tfe-st,.tfe-ev.racing .tfe-st{background:#6a4210}
.tfe-box .muted{opacity:.7}
@media (max-width:860px){
  .tfe-modal{padding:0;align-items:stretch}
  .tfe-box{border-radius:0;max-height:100dvh;height:100dvh;padding:10px}
  .tfe-grid{grid-template-columns:1fr;overflow:auto}
  .tfe-l,.tfe-r{overflow:visible;min-height:auto}
  .tfe-grid{display:flex;flex-direction:column}
  .tfe-prizes{grid-template-columns:repeat(3,1fr)}
  .tfe-row2{grid-template-columns:1fr}
  .tfe-tracks{max-height:none}
}
.tfe-videos{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:5px}
.tfe-videos button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;font-size:12px;text-align:left;min-width:0}
.tfe-videos button b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.tfe-videos button span{font-size:11px;opacity:.75}
.tfe-videos button.on{background:#6a4210;border-color:#ffb547}
.tfe-vprev{width:100%;height:200px;background:#000;border-radius:8px;object-fit:contain}
/* the event video everyone sees after the cheer window */
.tfe-vid{position:fixed;inset:0;z-index:85;background:#000;display:flex;flex-direction:column}
.tfe-vid video{flex:1;min-height:0;width:100%;object-fit:contain;background:#000}
.tfe-vid-bar{display:flex;align-items:center;gap:10px;padding:8px 12px;background:rgba(15,26,51,.92);color:#fff;font-size:13px}
.tfe-vid-bar b{font-size:15px}
.tfe-vid-bar span{opacity:.75;margin-right:auto}
.tfe-vid-bar button{font:inherit;color:#fff;background:#1c2d52;border:1px solid #3a5586;border-radius:8px;padding:6px 10px;font-weight:700;cursor:pointer}
.tfe-novideo{border:1px dashed #ffb547;border-radius:8px;padding:6px 8px;font-size:12px;background:rgba(255,181,71,.08);margin-top:4px}
.tfe-novideo b{color:#ffcf7a}
.tfe-box small button{padding:2px 8px;font-size:11px;margin-left:4px}
/* event banner (everyone, when an event race's cheer window opens) */
.tfe-banner{position:fixed;left:0;right:0;top:18%;z-index:84;display:flex;justify-content:center;padding:0 12px;cursor:pointer;animation:tfeBan .5s ease-out}
@keyframes tfeBan{from{transform:translateY(-30px) scale(.92);opacity:0}to{transform:none;opacity:1}}
.tfe-banner-in{max-width:min(760px,100%);text-align:center;padding:14px 22px;border-radius:16px;color:#fff;background:linear-gradient(rgba(14,20,40,.94),rgba(14,20,40,.94)) padding-box,linear-gradient(90deg,#ff5f6d,#ffc371,#ffe66d,#6dff9e,#58c7ff,#b26dff) border-box;border:3px solid transparent;box-shadow:0 10px 40px rgba(0,0,0,.6)}
.tfe-banner-in .k{font-size:13px;font-weight:900;letter-spacing:.2em;color:#ffd24a}
.tfe-banner-in .t{font-size:clamp(22px,4vw,36px);font-weight:900;margin:2px 0 4px;background:linear-gradient(180deg,#fff6c9,#ffc93a);-webkit-background-clip:text;background-clip:text;color:transparent}
.tfe-banner-in .s{font-size:13px;opacity:.9}
.tfe-banner-in .g{font-size:12px;opacity:.75;margin-top:4px}
.tfe-banner-in small{display:block;font-size:10px;opacity:.5;margin-top:6px}
.tfe-vid-load{position:absolute;left:0;right:0;top:45%;text-align:center;color:#fff;font-weight:700;opacity:.8;pointer-events:none}
