/* Handball Tracker Cloud v1.28 revision 6
   Phone clock controls, correct defender relevance, defensive pairs,
   single-player cards, yellow blocked shots, and phone-safe review layouts. */

body.v128r6-ui .r3-field-legend .blocked {
  border-color:#f2c94c!important;
  background:rgba(242,201,76,.12)!important;
}

body.v128r6-ui .r6-blocked-action,
body.v128r6-ui #blockedShotBtn,
body.v128r6-ui #v128r2BlockedBtn {
  background:linear-gradient(135deg,#d6a817,#f2c94c)!important;
  border-color:#ffe27a!important;
  color:#08111a!important;
  font-weight:900!important;
}
body.v128r6-ui #v128r2BlockedBtn b,
body.v128r6-ui #v128r2BlockedBtn span { color:#08111a!important; }
body.v128r6-ui #blockedShotBtn:disabled,
body.v128r6-ui #v128r2BlockedBtn:disabled { opacity:.42!important; }

body.v128r6-ui .r6-player-hero {
  padding:14px!important;
  background:
    radial-gradient(circle at 90% 0,rgba(66,183,83,.18),transparent 34%),
    linear-gradient(145deg,#081c2d,#05131f 68%)!important;
  border-color:#2b5669!important;
}
body.v128r6-ui .r6-player-heading {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:12px;
}
body.v128r6-ui .r6-player-heading h2 { margin:2px 0 3px;font-size:24px; }
body.v128r6-ui .r6-player-heading p { margin:0;max-width:700px;color:#91a8b7;font-size:11px; }
body.v128r6-ui .r6-player-heading label {
  flex:0 0 250px;
  color:#a7bac7;
  font-size:10px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.04em;
}
body.v128r6-ui .r6-player-heading select {
  width:100%;
  min-height:42px;
  margin-top:5px;
  border:1px solid #3a6375;
  border-radius:9px;
  background:#04121f;
  color:#f2f7f9;
  font-size:13px;
  font-weight:850;
}
body.v128r6-ui .r6-kicker {
  color:#68dc78;
  font-size:9px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}
body.v128r6-ui .r6-player-hero .r3-stat-card {
  background:linear-gradient(145deg,#0a2133,#071724)!important;
  border-color:#2d5267!important;
}
body.v128r6-ui .r6-player-hero .r3-stat-card.accent {
  box-shadow:inset 0 0 0 1px rgba(91,216,110,.16);
}

body.v128r6-ui .r6-loss-card { max-width:760px; }
body.v128r6-ui .r6-loss-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
body.v128r6-ui .r6-loss-grid>div {
  min-height:72px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:10px;
  border:1px solid #24485f;
  border-radius:10px;
  background:#071827;
}
body.v128r6-ui .r6-loss-grid span {
  color:#91a7b6;
  font-size:9px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  text-align:center;
}
body.v128r6-ui .r6-loss-grid strong { color:#f2f7f9;font-size:24px; }
body.v128r6-ui .r6-loss-grid .accent { border-color:#467c4d;background:#0a241b; }
body.v128r6-ui .r6-loss-grid .accent strong { color:#64d977; }
body.v128r6-ui .r6-table-help { margin:-3px 0 7px;color:#839bad;font-size:9px; }

body.v128r6-ui .r3-table-card { min-width:0;max-width:100%;overflow:hidden; }
body.v128r6-ui .r3-table-card .table-wrap { width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain; }
body.v128r6-ui .r3-table-card table { min-width:max-content; }
body.v128r6-ui .r3-review-card,
body.v128r6-ui #r3ReviewContent,
body.v128r6-ui #r3TeamContent { min-width:0;max-width:100%; }

@media(max-width:900px){
  body.v128r6-ui .professional-app-header .brand-lockup::before {
    display:none!important;
    content:none!important;
  }
  /* The old left-side hamburger was decorative only. Keep the functioning
     account/menu button on the right, and center the live-game heading. */
  body.v128r6-ui.v128r6-live-active .professional-app-header {
    grid-template-columns:minmax(0,1fr) 38px!important;
  }
  body.v128r6-ui.v128r6-live-active .brand-lockup,
  body.v128r6-ui.v128r6-live-active .brand-lockup::before,
  body.v128r6-ui.v128r6-live-active .r6-no-fake-menu::before {
    display:none!important;
    content:none!important;
  }
  body.v128r6-ui.v128r6-live-active .v128r2-live-heading {
    grid-column:1!important;
    grid-row:1!important;
    align-items:flex-start!important;
    padding-left:5px;
  }
  body.v128r6-ui.v128r6-live-active .header-menu-btn {
    grid-column:2!important;
    grid-row:1!important;
  }

  /* Pause/resume must be directly usable on a phone. */
  body.v128r6-ui .live-court-status-row {
    grid-template-columns:minmax(0,1fr) 112px!important;
  }
  body.v128r6-ui .match-clock-panel {
    min-width:112px!important;
    min-height:62px!important;
    gap:2px!important;
    padding:4px!important;
  }
  body.v128r6-ui .match-clock-panel .button-row {
    display:flex!important;
    width:100%;
    justify-content:center!important;
    gap:3px!important;
  }
  body.v128r6-ui .match-clock-panel .button-row button {
    display:block;
    width:100%;
    min-width:0!important;
    min-height:24px!important;
    padding:2px 4px!important;
    border-radius:5px!important;
    font-size:7.5px!important;
    line-height:1.05!important;
    white-space:nowrap;
  }
  body.v128r6-ui .match-clock-panel .button-row button.hidden { display:none!important; }
  body.v128r6-ui #matchClockDisplay { font-size:17px!important; }
  body.v128r6-ui #matchClockHalf { font-size:7px!important; }

  body.v128r6-ui .r6-player-heading { display:grid;gap:9px;margin-bottom:9px; }
  body.v128r6-ui .r6-player-heading h2 { font-size:19px; }
  body.v128r6-ui .r6-player-heading label { width:100%;flex:auto; }
  body.v128r6-ui .r6-player-heading select { min-height:38px;font-size:12px; }
}

@media(max-width:700px){
  body.v128r6-ui #reviewPage,
  body.v128r6-ui #gameReview,
  body.v128r6-ui .r3-review-shell { width:100%;max-width:100%;overflow-x:hidden; }
  body.v128r6-ui .r3-review-card.card { padding:8px!important; }
  body.v128r6-ui .r3-section-title { gap:6px;margin-bottom:6px; }
  body.v128r6-ui .r3-section-title h2 { font-size:13px; }
  body.v128r6-ui .r3-section-title p { font-size:8.5px; }
  body.v128r6-ui .r3-full-field-wrap,
  body.v128r6-ui .r3-timeline-wrap { overflow:hidden!important; }
  body.v128r6-ui .r3-full-field-wrap canvas,
  body.v128r6-ui .r3-timeline-wrap canvas {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  body.v128r6-ui .r3-full-field-wrap canvas { aspect-ratio:2/1!important; }
  body.v128r6-ui .r3-timeline-wrap canvas { aspect-ratio:4/1!important; }
  body.v128r6-ui .r3-half-court-wrap,
  body.v128r6-ui .r3-goal-wrap { max-width:100%; }
  body.v128r6-ui .r3-half-court-wrap canvas,
  body.v128r6-ui .r3-goal-wrap canvas { width:100%!important;max-width:100%!important; }
  body.v128r6-ui .r3-table-grid { gap:6px; }
  body.v128r6-ui .r3-table-card { padding:8px; }
  body.v128r6-ui .r3-table-card table { font-size:9px; }
  body.v128r6-ui .r3-table-card th,
  body.v128r6-ui .r3-table-card td { padding:5px 6px; }
  body.v128r6-ui .r6-loss-card { max-width:none; }
  body.v128r6-ui .r6-loss-grid { grid-template-columns:repeat(3,minmax(0,1fr));gap:4px; }
  body.v128r6-ui .r6-loss-grid>div { min-height:58px;padding:6px 3px; }
  body.v128r6-ui .r6-loss-grid span { font-size:7px; }
  body.v128r6-ui .r6-loss-grid strong { font-size:19px; }
  body.v128r6-ui .r6-player-hero { padding:9px!important; }
  body.v128r6-ui .r6-player-hero .r3-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.v128r6-ui .r6-player-hero .r3-stat-card { min-height:59px; }
  body.v128r6-ui .r6-player-hero .r3-stat-card span { min-height:20px; }
  body.v128r6-ui .r3-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }

  /* Prevent mobile browsers from auto-zooming when a Review filter receives focus. */
  body.v128r6-ui .r3-review-shell input,
  body.v128r6-ui .r3-review-shell select {
    font-size:16px!important;
  }
  body.v128r6-ui .r3-multi-menu { position:fixed;left:8px;right:8px;top:96px;min-width:0;max-height:60vh; }
}

@media(max-width:420px){
  body.v128r6-ui .live-court-status-row { grid-template-columns:minmax(0,1fr) 104px!important; }
  body.v128r6-ui .match-clock-panel { min-width:104px!important; }
  body.v128r6-ui .r3-filter-grid { grid-template-columns:1fr 1fr; }
}
