
#st-hud {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; max-width: 560px; margin: 0 auto; z-index: 4;
  display: grid; gap: 4px; padding: 8px 12px; text-align: center;
  background: #fbf3df; border: 3px solid #6b4f2a; border-radius: 6px; box-shadow: 0 3px 0 rgba(0,0,0,.35);
  font-family: "Pixelify Sans", "Segoe UI", sans-serif; color: #2b1d12;
}
#st-league { font-size: 14px; color: #7a6a52; }
#st-score { font-size: 18px; font-weight: 600; }
#st-score.up { color: #2c7a35; }
#st-score.down { color: #b23a2a; }
.st-btns { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.st-btns button, .st-btns select { font: inherit; font-size: 14px; padding: 3px 10px; border: 2px solid #6b4f2a; border-radius: 4px; background: #f1e4c3; color: #2b1d12; cursor: pointer; }
.st-btns select { max-width: 170px; }
#panel-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
#panel-body td, #panel-body th { padding: 4px 6px; border-bottom: 1px solid #f1e4c3; text-align: left; }
#panel-body td.num { text-align: right; font-variant-numeric: tabular-nums; }
#panel-body tr.mine td { background: #fff1c2; font-weight: 600; }

#st-proj { font-size: 13px; color: #6b5c46; }

#st-score, #st-proj { font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 8px; border-radius: 10px; background: #f1e4c3; border: 1px solid #c9b48c; }
.chip.gold { background: #fff1c2; border-color: #e0b53a; font-weight: 600; }
.st-wide { display: block; width: 100%; margin-top: 12px; padding: 10px; font: inherit; font-weight: 600; border: 2px solid #6b4f2a; border-radius: 4px; background: #d77a35; color: #fff; cursor: pointer; }
.st-ghost { background: #f1e4c3; color: #2b1d12; font-weight: 400; }
.who { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.who-btn { display: grid; gap: 2px; padding: 10px; text-align: left; font: inherit; background: #fff8e8; border: 2px solid #6b4f2a; border-radius: 4px; cursor: pointer; }
.who-btn b { font-family: "Pixelify Sans", "Segoe UI", sans-serif; }
.who-btn span { font-size: 12px; color: #7a6a52; }
.tm-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.tm-pick { font: inherit; padding: 4px 8px; border: 2px solid #6b4f2a; border-radius: 4px; background: #f1e4c3; }
.tm-bar { position: relative; height: 26px; background: #9fd0a4; border: 2px solid #6b4f2a; border-radius: 4px; overflow: hidden; }
.tm-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #e7a79c; }
.tm-bar em { position: relative; display: block; text-align: center; line-height: 22px; font-style: normal; font-size: 13px; font-weight: 600; }
.tm-verdict { margin: 6px 0 4px; font-weight: 600; text-align: center; }
.tm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tm-list { display: grid; gap: 4px; max-height: 46vh; overflow: auto; }
.tm-item { display: flex; justify-content: space-between; gap: 6px; padding: 6px 8px; font: inherit; font-size: 13px; text-align: left; background: #fff8e8; border: 2px solid #f1e4c3; border-radius: 4px; cursor: pointer; }
.tm-item small { color: #7a6a52; }
.tm-item.on { border-color: #d77a35; background: #ffe3c4; }
@media (max-width: 600px) { .tm-cols { grid-template-columns: 1fr; } .tm-list { max-height: 30vh; } }
@media (max-width: 600px) {
  #st-hud { padding: 6px 8px; gap: 2px; }
  #st-score { font-size: 16px; }
  .st-btns { flex-wrap: nowrap; gap: 4px; }
  .st-btns button { font-size: 12px; padding: 3px 6px; white-space: nowrap; }
}


.mu-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 10px; text-align: center; }
.mu-team { display: grid; padding: 8px; border-radius: 6px; background: #f1e4c3; }
.mu-team b { font-family: "Pixelify Sans", "Segoe UI", sans-serif; font-size: 28px; }
.mu-team small { color: #7a6a52; font-size: 12px; }
.mu-team span { font-size: 13px; font-weight: 600; }
.mu-team.lead { background: #d9efd9; }
.mu-vs { font-family: "Pixelify Sans", "Segoe UI", sans-serif; font-size: 18px; color: #7a6a52; }
.mu-rows { display: grid; gap: 4px; }
.mu-row { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; gap: 4px; }
.mu-slot { text-align: center; font-family: "Pixelify Sans", "Segoe UI", sans-serif; font-size: 13px; background: #2b3a24; color: #fff; border-radius: 4px; padding: 3px 0; }
.mu-side { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 6px; padding: 4px 6px; background: #fff8e8; border: 1px solid #f1e4c3; border-radius: 4px; min-width: 0; }
.mu-side.right { grid-template-columns: auto 1fr 36px; text-align: right; }
.mu-side.right .mu-face { order: 3; } .mu-side.right .mu-who { order: 2; } .mu-side.right .mu-pts { order: 1; }
.mu-face { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #e9dcb8; display: block; }
.mu-who { display: grid; min-width: 0; }
.mu-who b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-who small { font-size: 11px; color: #7a6a52; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-pts { font-family: "Pixelify Sans", "Segoe UI", sans-serif; font-size: 16px; font-weight: 600; }
@media (max-width: 600px) {
  .mu-row { grid-template-columns: 1fr 34px 1fr; }
  .mu-side { grid-template-columns: 28px 1fr auto; padding: 3px 4px; gap: 4px; }
  .mu-side.right { grid-template-columns: auto 1fr 28px; }
  .mu-face { width: 28px; height: 28px; }
  .mu-who b { font-size: 11px; } .mu-who small { font-size: 9px; } .mu-pts { font-size: 13px; }
  .mu-slot { font-size: 10px; }
}


.looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.look { padding: 4px; background: #fff8e8; border: 2px solid #f1e4c3; border-radius: 6px; cursor: pointer; }
.look.on { border-color: #d77a35; background: #ffe3c4; }
.look-face { display: block; width: 48px; height: 48px; margin: 0 auto; background-size: 192px 192px; background-position: 0 0; image-rendering: pixelated; }
#play-btn { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 4;
  font: 600 18px "Pixelify Sans", "Segoe UI", sans-serif; padding: 8px 18px; color: #fff; background: #d77a35; border: 3px solid #6b4f2a; border-radius: 6px; box-shadow: 0 3px 0 rgba(0,0,0,.35); cursor: pointer; }
#mg-hud { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; max-width: 560px; margin: 0 auto; z-index: 6; display: grid; gap: 4px; text-align: center;
  padding: 8px 10px; background: #fbf3df; border: 3px solid #6b4f2a; border-radius: 6px; box-shadow: 0 3px 0 rgba(0,0,0,.35); font-family: "Pixelify Sans", "Segoe UI", sans-serif; color: #2b1d12; }
#mg-hud[hidden] { display: none; }
#mg-score { font-size: 20px; font-weight: 600; }
#mg-down { font-size: 13px; color: #7a6a52; }
#mg-msg { font-size: 15px; min-height: 20px; }
.mg-btns { display: flex; gap: 6px; justify-content: center; }
.mg-btns button { font: inherit; font-size: 14px; padding: 3px 10px; border: 2px solid #6b4f2a; border-radius: 4px; background: #f1e4c3; cursor: pointer; }
#prompt { cursor: pointer; }
#play-btn[hidden] { display: none !important; }

.td-banner { position: fixed; left: 50%; top: 42%; z-index: 50; transform: translate(-50%, -50%); pointer-events: none;
  background: linear-gradient(180deg, #241773, #120b3d); border: 3px solid #ffd84a; border-radius: 14px; padding: 12px 22px; text-align: center;
  box-shadow: 0 0 0 3px #1d140c, 0 12px 40px rgba(0,0,0,.6); animation: td-sweep 3.2s ease-in-out forwards; max-width: 92vw; min-width: 260px; white-space: nowrap; }
.td-banner b { display: block; font: 800 26px "Segoe UI", "Helvetica Neue", Arial, sans-serif; color: #ffd84a; letter-spacing: 1px; text-shadow: 0 3px 0 #9e7c0c; }
.td-banner i { display: block; font: 800 21px "Segoe UI", "Helvetica Neue", Arial, sans-serif; color: #ffffff; font-style: normal; margin-top: 2px; }
.td-banner i:empty { display: none; }
.td-banner span { display: block; font: 700 17px "Segoe UI", "Helvetica Neue", Arial, sans-serif; color: #fff4d6; margin-top: 4px; }
.td-banner.mine { border-color: #9dff7a; }
.td-banner.calm { animation: td-fade 3.2s ease forwards; }
@keyframes td-sweep { 0% { transform: translate(-160%, -50%) skewX(-12deg); opacity: 1; } 14% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; } 20%, 82% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(80%, -50%) skewX(12deg); opacity: 0; } }
@keyframes td-fade { 0% { opacity: 0; } 10%, 85% { opacity: 1; } 100% { opacity: 0; } }


#st-ticker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; overflow: hidden; white-space: nowrap; pointer-events: none;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); background: rgba(16,19,24,.92); border-top: 2px solid #3a3f47;
  font: 700 14px/1.2 "Segoe UI", "Helvetica Neue", Arial, sans-serif; color: #9ff3ff; }
#st-ticker[hidden] { display: none; }
#st-ticker span { display: inline-block; padding-left: 100%; animation: st-tick 30s linear infinite; }
@keyframes st-tick { to { transform: translateX(-100%); } }
#zoom-ctl, #jump-btn { margin-bottom: 30px; }
#st-fold { position: absolute; top: 2px; right: 4px; font: 700 14px/1 sans-serif; padding: 4px 8px; border: 0; background: none; color: #6b4f2a; cursor: pointer; }
#st-hud.mini #st-league, #st-hud.mini #st-proj, #st-hud.mini .st-btns { display: none; }
#st-hud.mini { padding-top: 4px; padding-bottom: 4px; }


.tp-head { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; padding: 10px 12px; margin-bottom: 6px; border-radius: 8px; background: #2b3a24; color: #fff; }
.tp-score { display: grid; text-align: center; padding-right: 14px; border-right: 1px solid rgba(255,255,255,.2); }
.tp-score b { font: 700 30px/1.1 "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
.tp-score small, .tp-owner { color: #c9d4bf; font-size: 12px; }
.tp-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.tp-stats span { display: grid; font-size: 11px; color: #c9d4bf; }
.tp-stats b { font: 700 17px "Segoe UI", "Helvetica Neue", Arial, sans-serif; color: #fff; }
.tp-owner { grid-column: 1 / -1; }
.tp-list { display: grid; gap: 4px; }
.tp-card { display: grid; grid-template-columns: 36px 38px 1fr auto; align-items: center; gap: 8px; padding: 4px 8px; background: #fff8e8; border: 1px solid #f1e4c3; border-radius: 6px; min-width: 0; }
.tp-pos { font: 700 11px "Segoe UI", Arial, sans-serif; color: #fff; text-align: center; padding: 3px 0; border-radius: 4px; }
.tp-more { margin-top: 10px; }
.tp-more summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.tp-card .mu-pts { font: 700 17px "Segoe UI", "Helvetica Neue", Arial, sans-serif; } 
