.stm-root {
  --stm-orange: #ea580c;
  --stm-orange-light: #fff7ed;
  --stm-dark: #202124;
  --stm-muted: #737373;
  --stm-line: #e5e5e5;
  width: 100%;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--stm-dark);
}
.stm-root * { box-sizing: border-box; }
.stm-shell {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--stm-line);
  border-radius: 18px;
  box-shadow: 0 8px 35px rgba(0,0,0,.05);
}
.stm-loading { color: var(--stm-muted); }
.stm-header { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:30px; }
.stm-eyebrow { color:var(--stm-orange); font-size:10px; font-weight:800; letter-spacing:2px; }
.stm-title, .stm-title-input { display:block; margin:7px 0; color:var(--stm-dark); font-size:24px; line-height:1.25; font-weight:800; }
.stm-title-input { width:min(100%, 450px); padding:5px 0; border:0; border-bottom:2px solid transparent; background:transparent; outline:none; }
.stm-title-input:focus { border-bottom-color:var(--stm-orange); background:var(--stm-orange-light); }
.stm-heading-copy p { margin:0; color:var(--stm-muted); font-size:13px; }
.stm-header-actions { display:flex; align-items:center; gap:10px; }
.stm-role { padding:7px 9px; border-radius:5px; background:#f5f5f5; color:#666; font-size:9px; font-weight:800; letter-spacing:.7px; white-space:nowrap; }
.stm-role-admin { background:#fff1e6; color:#c2410c; }
.stm-save { border:0; border-radius:7px; padding:11px 15px; background:var(--stm-orange); color:white; font-weight:700; font-size:12px; cursor:pointer; white-space:nowrap; }
.stm-save:hover { background:#c2410c; }
.stm-save:disabled { opacity:.65; cursor:wait; }
.stm-bracket-scroll { overflow-x:auto; padding:8px 0 20px; }
.stm-bracket { display:grid; grid-template-columns:180px 180px 180px 180px 190px; gap:30px; min-width:1040px; align-items:center; }
.stm-stage { display:flex; flex-direction:column; justify-content:center; gap:22px; min-width:0; }
.stm-stage h3 { display:flex; align-items:center; gap:8px; margin:0; font-size:11px; letter-spacing:.5px; text-transform:uppercase; white-space:nowrap; }
.stm-stage h3 i { padding:5px 7px; border-radius:5px; background:var(--stm-orange-light); color:var(--stm-orange); font-size:10px; font-style:normal; }
.stm-groups { display:flex; flex-direction:column; gap:18px; }
.stm-group-card, .stm-match { overflow:hidden; border:1px solid var(--stm-line); border-radius:9px; background:#fff; }
.stm-group-card h4 { margin:0; padding:9px; border-bottom:1px solid var(--stm-line); background:#f8f8f8; text-align:center; font-size:10px; letter-spacing:1px; }
.stm-group-teams { padding:5px; }
.stm-group-input { display:block; width:100%; height:31px; padding:4px 6px; border:0; border-bottom:1px solid #eee; border-radius:0; outline:none; background:#fff; color:var(--stm-dark); text-align:center; font-size:12px; font-weight:600; }
.stm-group-input:last-child { border-bottom:0; }
.stm-group-input:focus { background:var(--stm-orange-light); }
.stm-group-input[readonly] { cursor:default; }
.stm-note { margin:-10px 0 0; color:var(--stm-muted); font-size:10px; line-height:1.5; }
.stm-match-list { display:flex; flex-direction:column; gap:17px; }
.stm-semis { gap:65px; }
.stm-final { justify-content:center; }
.stm-match-heading { padding:7px 9px; border-bottom:1px solid var(--stm-line); background:#f8f8f8; color:var(--stm-muted); font-size:9px; font-weight:800; letter-spacing:.7px; }
.stm-team-row { border-bottom:1px solid #eee; }
.stm-team-row:last-of-type { border-bottom:0; }
.stm-team { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-height:37px; padding:9px 8px; border:0; background:white; color:var(--stm-dark); text-align:left; font-size:11px; font-weight:600; }
button.stm-team { cursor:pointer; }
button.stm-team:not(:disabled):hover { background:var(--stm-orange-light); }
.stm-team:disabled { color:#aaa; cursor:default; }
.stm-team span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.stm-team b { color:var(--stm-orange); }
.stm-team.is-winner { background:#fff1e6; color:#c2410c; font-weight:800; }
.stm-team-view { cursor:default; }
.stm-score-line { display:flex; justify-content:space-between; align-items:center; gap:5px; padding:6px 8px; background:#fafafa; color:var(--stm-muted); font-size:9px; }
.stm-score-fields { display:flex; align-items:center; gap:4px; }
.stm-score { width:29px; height:23px; padding:2px; border:1px solid var(--stm-line); border-radius:4px; text-align:center; font-size:10px; font-weight:700; }
.stm-champion { display:flex; min-height:180px; flex-direction:column; align-items:center; justify-content:center; padding:18px 12px; border:1px solid #fed7aa; border-radius:12px; background:linear-gradient(145deg,#fff7ed,#ffedd5); text-align:center; }
.stm-trophy { margin-bottom:10px; font-size:36px; }
.stm-champion > span { color:#c2410c; font-size:9px; font-weight:900; letter-spacing:1px; }
.stm-champion strong { margin:11px 0 5px; overflow-wrap:anywhere; font-size:17px; }
.stm-champion small { color:#9a3412; font-size:10px; }
.stm-champion.has-champion { border:2px solid var(--stm-orange); box-shadow:0 5px 20px rgba(234,88,12,.12); }
.stm-footer { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin-top:15px; padding-top:16px; border-top:1px solid var(--stm-line); font-size:11px; }
.stm-status-dot { width:8px; height:8px; border-radius:50%; background:#16a34a; }
.stm-footer-note { margin-left:auto; color:var(--stm-muted); font-weight:400; }
.stm-save-status { width:100%; color:#15803d; }
@media(max-width:650px) {
  .stm-shell { padding:17px; }
  .stm-header { align-items:flex-start; flex-direction:column; }
  .stm-title, .stm-title-input { font-size:20px; }
  .stm-footer-note { width:100%; margin-left:17px; }
}
