

  :root{
    --panel: #151515;
    --warn: #F5A623;
    /* derivadas: todo el tono sale de las variables del equipo */
    --line: color-mix(in srgb, var(--gold) 35%, transparent);
    --g06: color-mix(in srgb, var(--gold) 6%, transparent);
    --g12: color-mix(in srgb, var(--gold) 12%, transparent);
    --g18: color-mix(in srgb, var(--gold) 18%, transparent);
    --g55: color-mix(in srgb, var(--gold) 55%, transparent);
    --c06: color-mix(in srgb, var(--cream) 6%, transparent);
    --c10: color-mix(in srgb, var(--cream) 10%, transparent);
    --c18: color-mix(in srgb, var(--cream) 18%, transparent);
    --c35: color-mix(in srgb, var(--cream) 35%, transparent);
    --c55: color-mix(in srgb, var(--cream) 55%, transparent);
    --body-text: color-mix(in srgb, var(--cream) 88%, transparent);
    --plate: color-mix(in srgb, var(--ink) 90%, transparent);
    --team-wash: color-mix(in srgb, var(--green) 30%, transparent);
    --ease: cubic-bezier(.2,.75,.2,1);
  }

  *{box-sizing:border-box; margin:0; padding:0;}

  body{
    background: var(--ink);
    font-family:'Roboto', sans-serif;
    color: var(--cream);
    display:flex;
    justify-content:center;
    padding: 40px 16px;
  }

  button, input{ font:inherit; color:inherit; background:none; border:0; text-align:inherit; }
  button{ cursor:pointer; }
  button:focus-visible, .tip:focus-visible, .step:focus-visible{ outline: 2px solid var(--gold); outline-offset: 3px; }

  @keyframes rise{ from{ opacity:0; transform: translateY(16px); } to{ opacity:1; transform:none; } }
  @keyframes dotin{ from{ opacity:0; transform: translate(-50%,-50%) scale(.3); } to{ opacity:1; transform: translate(-50%,-50%) scale(1); } }
  @keyframes ring{ 0%{ transform: scale(.9); opacity:.85; } 100%{ transform: scale(1.7); opacity:0; } }
  @keyframes grow{ from{ clip-path: inset(0 50% 0 50%); } to{ clip-path: inset(0 0 0 0); } }
  @keyframes pin{ from{ opacity:0; transform: scale(0); } to{ opacity:1; transform: scale(1); } }
  @keyframes slideup{ from{ opacity:0; transform: translateY(100%); } to{ opacity:1; transform:none; } }
  @keyframes fade{ from{ opacity:0; transform: translateY(6px); } to{ opacity:1; transform:none; } }

  .sheet{
    width: 100%;
    max-width: 900px;
    background: linear-gradient(180deg, var(--green-deep) 0, var(--ink) 620px, var(--ink) 100%);
    position:relative;
    overflow:hidden;
    border: 1px solid var(--line);
  }

  header{
    position:relative;
    padding: 36px 40px 34px;
    border-bottom: 8px solid var(--green);
    box-shadow: 0 1px 0 var(--g55);
    min-height: 380px;
    isolation:isolate;
  }
  /* círculos concéntricos de centro de pista: el motivo se repite tras el escudo */
  header::before{
    content:"";
    position:absolute; inset:0; z-index:-1;
    background:
      repeating-radial-gradient(circle at 84% 42%, transparent 0 34px, var(--g18) 34px 35px),
      radial-gradient(circle at 84% 42%, var(--team-wash), transparent 55%);
    -webkit-mask-image: radial-gradient(circle at 84% 42%, black 0, black 25%, transparent 68%);
            mask-image: radial-gradient(circle at 84% 42%, black 0, black 25%, transparent 68%);
    pointer-events:none;
  }

  .logo-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom: 30px;
  }
  .logo-row img{ display:block; }
  .nba-logo{ height: 26px; width:auto; filter: brightness(0) invert(1); opacity:0.92; }
  .team-logo{
    position:absolute; top: 36px; right: 40px;
    height: clamp(170px, 30vw, 270px); width:auto; max-width: 300px;
    object-fit: contain; object-position: right top;
    filter: drop-shadow(0 14px 22px rgba(0,0,0,.45));
    animation: fade .8s var(--ease) .15s backwards;
  }
  @media (min-width: 621px){
    header .season-tag, header h1, header .subhead, header .hint{ max-width: calc(100% - clamp(170px, 31vw, 310px)); }
  }

  .season-tag{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size: 13px;
    letter-spacing: 0.22em;
    color: var(--ink);
    background: var(--gold);
    padding: 6px 14px 6px 16px;
    display:inline-block;
    margin-bottom: 20px;
    animation: rise .5s var(--ease) backwards;
  }

  h1{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size: clamp(50px, 14.5vw, 92px);
    line-height: 0.84;
    letter-spacing: -0.005em;
    color: var(--cream);
    text-transform:uppercase;
    animation: rise .65s var(--ease) .08s backwards;
  }
  h1 span{ color: var(--gold); display:inline-block; }
  h1 span::after{ content:""; display:block; height: 8px; margin-top: 12px; background: var(--green); }

  .subhead{
    margin-top: 24px;
    font-size: 18px;
    color: var(--cream);
    max-width: 560px;
    line-height:1.5;
    padding-left: 16px;
    border-left: 4px solid var(--green);
    animation: rise .6s var(--ease) .2s backwards;
  }
  .subhead em{ font-style: italic; color: var(--gold); }
  .hint{
    margin-top: 18px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--silver);
    max-width: 560px;
    animation: rise .6s var(--ease) .3s backwards;
  }
  .hint b{ color: var(--gold); font-weight:500; }
  /* Botón Imprimir: discreto, bajo la ayuda de la cabecera; no sale en el papel */
  .print-btn{
    display:inline-flex; align-items:center; gap: 7px;
    margin-top: 14px;
    padding: 6px 14px;
    min-height: 36px;
    border: 1px solid var(--line);
    font-family:'Roboto Condensed', sans-serif;
    font-weight:600; font-size: 12px;
    letter-spacing:0.08em; text-transform:uppercase;
    color: var(--silver);
    transition: color .15s, border-color .15s, background .15s;
  }
  .print-btn:hover{ color: var(--ink); background: var(--gold); border-color: var(--gold); }

  /* GLOSARIO — siglas con tooltip */
  .tip{
    border-bottom: 1px dotted currentColor;
    cursor: help;
    display:inline;
    padding:0;
  }

  /* PISTA */
  .court-wrap{
    position:relative;
    padding: 48px 40px 22px;
  }

  .court{
    position:relative;
    width:100%;
    aspect-ratio: 860/500;
    background:
      radial-gradient(ellipse 55% 60% at 50% 100%, color-mix(in srgb, var(--gold) 26%, transparent), transparent 70%),
      repeating-linear-gradient(90deg, transparent 0 43px, color-mix(in srgb, var(--ink) 16%, transparent) 43px 45px),
      var(--green);
    border: 3px solid var(--gold);
    box-shadow: 10px 10px 0 var(--g18);
    overflow:hidden;
  }
  .court::after{
    content:""; position:absolute; inset:0; pointer-events:none;
    box-shadow: inset 0 0 90px color-mix(in srgb, var(--ink) 48%, transparent);
  }
  .court > svg{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    display:block;
  }
  .court svg .c-out{ fill: color-mix(in srgb, var(--ink) 20%, transparent); }
  .court svg .c-key{ fill: color-mix(in srgb, var(--green-deep) 72%, transparent); }
  .court svg .c-line{ stroke: var(--c55); }
  .court svg .c-rim{ stroke: var(--cream); }

  .player-dot{
    position:absolute;
    z-index:2;
    display:flex;
    flex-direction:column;
    align-items:center;
    transform: translate(-50%,-50%);
    text-align:center;
    transition: transform .18s var(--ease);
    animation: dotin .55s var(--ease) backwards;
  }
  .player-dot:nth-of-type(1){ animation-delay:.25s; }
  .player-dot:nth-of-type(2){ animation-delay:.33s; }
  .player-dot:nth-of-type(3){ animation-delay:.41s; }
  .player-dot:nth-of-type(4){ animation-delay:.49s; }
  .player-dot:nth-of-type(5){ animation-delay:.57s; }
  .player-dot:hover{ transform: translate(-50%,-56%) scale(1.07); z-index:3; }
  .player-dot .num{
    position:relative;
    width: 58px; height:58px;
    background: var(--cream);
    color: var(--green-deep);
    border: 3px solid var(--gold);
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size:27px;
    line-height:1;
    box-shadow: 3px 4px 0 var(--ink);
    transition: background .15s, box-shadow .18s;
  }
  .player-dot:hover .num{ box-shadow: 3px 9px 0 var(--ink); }
  .player-dot[aria-expanded="true"] .num{ background: var(--gold); }
  .player-dot .pname{
    margin-top:7px;
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size: 14px;
    letter-spacing: 0.02em;
    color: var(--cream);
    background: var(--plate);
    padding: 2px 9px;
    white-space:nowrap;
  }
  .player-dot .ppos{
    font-family:'Roboto Mono', monospace;
    font-weight:700;
    font-size: 10px;
    letter-spacing:0.14em;
    color: var(--gold);
    background: var(--plate);
    padding: 1px 7px 1px 9px;
  }

  /* Coordenadas sobre el viewBox 860x500 (aro abajo, línea de triple con cima en y=180) */
  .pos-pg{ top: 24%; left: 50%; }   /* cima de la zona */
  .pos-sg{ top: 36%; left: 80%; }   /* ala derecha */
  .pos-sf{ top: 36%; left: 20%; }   /* ala izquierda */
  .pos-pf{ top: 74%; left: 64%; }   /* codo / poste derecho */
  .pos-c{  top: 78%; left: 36%; }   /* poste bajo izquierdo */

  /* ESTRELLA (capa dorada) y JUGADOR CLAVE (llave) */
  .player-dot .pname.star{
    background: var(--gold);
    color: var(--ink);
  }
  .player-dot:has(.pname.star) .num{ width: 66px; height: 66px; font-size: 31px; background: var(--gold); border-color: var(--cream); }
  .player-dot:has(.pname.star) .num::after{
    content:""; position:absolute; inset:-9px; border-radius:50%;
    border: 2px solid var(--gold);
    pointer-events:none;
    animation: ring 2.4s ease-out 1s infinite;
  }
  .keyic{ display:inline-block; vertical-align:-2px; margin-left:5px; color: var(--gold); flex:none; }
  .player-dot .keyic{ width:16px; height:16px; }
  .card .info .name .starhl, .card .info .name .starhl:hover{
    background: var(--gold);
    color: var(--ink);
    padding: 0 8px;
  }
  .tag.star{ background: var(--gold); border-color: var(--gold); color: var(--ink); }
  .tag.key{ color: var(--gold); }
  .tag .keyic{ margin: 0 3px 0 0; }
  .legend{
    display:flex; gap: 8px 22px; flex-wrap:wrap;
    margin-top: 18px;
    font-size: 12.5px;
    color: var(--silver);
  }
  .legend .tip{ display:inline-flex; align-items:center; gap: 6px; color: var(--cream); }
  .legend .lg{ display:inline-flex; align-items:center; gap: 8px; flex-wrap:wrap; }
  .legend .who{ color: var(--silver); font-size: 12.5px; padding: 0; min-height: 28px; }
  .legend .who::before{ content:"· "; }
  .legend .who:hover{ color: var(--cream); text-decoration: underline; }
  .legend .swatch{ background: var(--gold); color: var(--ink); font-family:'Roboto Condensed', sans-serif; font-weight:700; font-size: 11px; padding: 1px 7px; text-transform:uppercase; letter-spacing:0.04em; }

  /* TÍTULOS DE SECCIÓN (h2): regla de equipo + título grande */
  .roster-title, .record-title{
    font-family:'Roboto Condensed', sans-serif;
    text-transform:uppercase;
    font-weight:700;
    font-size: 30px;
    line-height: 1;
    letter-spacing:0.02em;
    color: var(--cream);
    padding-top: 16px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-top: 4px solid var(--green);
    border-bottom: 1px solid var(--line);
    display:flex;
    justify-content:space-between;
    align-items:baseline;
    gap: 6px 14px;
    flex-wrap: wrap;
  }
  .roster-title small, .record-title small{
    font-family:'Roboto', sans-serif;
    font-weight:500;
    text-transform:none;
    letter-spacing:0.02em;
    font-size: 12.5px;
    color: var(--gold);
  }
  .roster-title small{ color: var(--silver); font-weight:400; }

  /* QUINTETO: tarjetas de programa */
  .roster{ padding: 38px 40px 10px; }

  .card{
    position:relative;
    display:grid;
    grid-template-columns: 88px 1fr auto;
    gap: 6px 20px;
    align-items:center;
    padding: 22px 14px 22px 4px;
    border-bottom: 1px solid var(--g18);
    transition: background .2s;
    animation: rise linear backwards;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
  .card:last-child{ border-bottom:none; }
  .card::before{
    content:""; position:absolute; left:0; top:12%; bottom:12%; width:4px;
    background: var(--green);
    transform: scaleY(0); transform-origin: bottom;
    transition: transform .25s var(--ease);
  }
  .card:hover, .card:focus-within{ background: linear-gradient(90deg, var(--g06), transparent 80%); }
  .card:hover::before, .card:focus-within::before{ transform: scaleY(1); }
  .card:has(.starhl){ background: linear-gradient(90deg, var(--team-wash), transparent 75%); }
  .card:has(.starhl)::before{ transform: scaleY(1); }

  .card .badge{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size: 70px;
    line-height: .9;
    letter-spacing: -0.03em;
    color: var(--gold);
    text-align:right;
    padding: 0 4px 0 0;
    position:relative;
    transition: color .2s, transform .25s var(--ease);
  }
  .card .badge:hover{ color: var(--cream); transform: translateX(-3px); }
  .card:has(.starhl) .badge{ color: var(--cream); }

  .warn-dot{
    position:absolute;
    top:-4px; right:-4px;
    width:20px; height:20px;
    border-radius:50%;
    background: var(--warn);
    color: var(--ink);
    font-family:'Roboto', sans-serif;
    font-size: 13px;
    font-weight:700;
    display:flex; align-items:center; justify-content:center;
    border: 2px solid var(--ink);
  }

  .card .info .name{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size: 27px;
    line-height: 1.05;
    letter-spacing: 0.01em;
    color: var(--silver);
    text-transform:uppercase;
  }
  .card .info .name button{ color: var(--cream); text-align:left; transition: color .15s; }
  .card .info .name button:hover{ color: var(--gold); }
  .card .info .role{
    font-family:'Roboto Mono', monospace;
    font-size: 11.5px;
    color: var(--silver);
    letter-spacing:0.03em;
    margin-top: 6px;
  }
  .card .info .note{
    font-size: 14px;
    font-style:italic;
    color: var(--body-text);
    margin-top: 9px;
    max-width: 480px;
    line-height:1.5;
  }
  .award{
    display:inline-block;
    font-family:'Roboto Mono', monospace;
    font-style:normal;
    font-size: 10.5px;
    font-weight:700;
    letter-spacing:0.05em;
    color: var(--ink);
    background: var(--gold);
    padding: 2px 6px;
    margin-right: 4px;
    border-bottom: 0;
  }

  .card .stats{
    display:flex;
    text-align:center;
  }
  .card .stats > div{
    display:flex;
    flex-direction:column;
    min-width: 62px;
    padding: 2px 14px;
  }
  .card .stats > div + div{ border-left: 1px solid var(--line); }
  .card .stats .val{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size: 32px;
    line-height: 1;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
  }
  .card .stats .lbl{
    font-family:'Roboto Mono', monospace;
    font-size: 10px;
    letter-spacing:0.14em;
    color: var(--silver);
    margin-top:6px;
  }

  /* RESTO DE LA PLANTILLA */
  .rest{ padding: 30px 40px 10px; }
  .chips{
    display:flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x:auto;
    scrollbar-width: none;
  }
  .chips::-webkit-scrollbar{ display:none; }
  .chip{
    flex: 0 0 auto;
    font-family:'Roboto Condensed', sans-serif;
    font-weight:600;
    font-size: 13px;
    letter-spacing:0.06em;
    padding: 8px 14px;
    min-height: 40px;
    border: 1px solid var(--line);
    color: var(--silver);
    transition: background .15s, color .15s, border-color .15s;
  }
  .chip:hover{ color: var(--cream); border-color: var(--g55); }
  .chip[aria-pressed="true"]{
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
  }
  .chip .count{ font-family:'Roboto Mono', monospace; font-size: 11px; opacity:.75; margin-left:4px; }
  /* Cabeceras de orden: se leen y ordenan como una tabla (columna 1 de arriba a abajo, luego la 2) */
  .rest{ --bench-cols: 34px minmax(0,1fr) 50px 40px 54px; }
  .rest-head{ display:grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .rest-head .hd{
    display:grid;
    grid-template-columns: var(--bench-cols);
    align-items:center;
    gap: 10px;
    padding: 0 4px;
    border-bottom: 2px solid var(--green);
  }
  .sorth{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size: 11px;
    letter-spacing:0.1em;
    text-transform:uppercase;
    color: var(--silver);
    min-height: 40px;
    display:flex; align-items:center; gap: 5px;
    padding: 0;
  }
  button.sorth{ cursor:pointer; }
  button.sorth:hover{ color: var(--cream); }
  .sorth.r{ justify-content:flex-end; }
  .sorth.plain{ opacity:.75; }
  .sorth[data-dir]{ color: var(--gold); }
  .sorth[data-dir]::after{ content:""; border: 4px solid transparent; }
  .sorth[data-dir="asc"]::after{ border-top:0; border-bottom: 5px solid currentColor; }
  .sorth[data-dir="desc"]::after{ border-bottom:0; border-top: 5px solid currentColor; }

  .rest-grid{
    columns: 2;
    column-gap: 24px;
  }
  .rest-item{
    display:grid;
    grid-template-columns: var(--bench-cols);
    align-items:center;
    gap: 10px;
    width:100%;
    break-inside: avoid;
    font-size: 14px;
    padding: 9px 4px;
    min-height: 44px;
    border-bottom: 1px solid var(--g12);
    color: var(--body-text);
    transition: background .15s, padding-left .2s var(--ease);
  }
  .rest-item:hover{ background: var(--g12); padding-left: 10px; }
  .rest-item[hidden]{ display:none; }
  .rest-item .rnum{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size: 17px;
    color: var(--gold);
    text-align:right;
  }
  .rest-item .rnum.dup{ color: var(--warn); }
  .rest-item .rname{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
  .rest-item .rppg{ font-family:'Roboto Mono', monospace; font-size: 13px; color: var(--gold); text-align:right; }
  .rest-item .rpos{ font-family:'Roboto Mono', monospace; font-size: 11px; color: var(--silver); }
  .rest-item .rage{ font-family:'Roboto Mono', monospace; font-size: 12px; color: var(--silver); text-align:right; }
  .tag{
    font-family:'Roboto Condensed', sans-serif;
    font-size: 10px;
    font-weight:700;
    letter-spacing:0.08em;
    text-transform:uppercase;
    padding: 1px 5px;
    border: 1px solid var(--line);
    color: var(--gold);
  }
  .tag.new{ border-color: var(--c35); color: var(--cream); }

  /* CLAVES */
  .notes{ padding: 30px 40px 20px; }
  .disc-h{ margin: 0; font: inherit; }
  .notes-body{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 36px;
  }

  /* MÓDULOS PLEGABLES: se ven como un botón, con cuenta y verbo ("Desplegar" / "Plegar") */
  .disc{
    display:flex; align-items:center; gap: 12px;
    width:100%;
    min-height: 60px;
    padding: 12px 18px;
    text-align:left;
    border: 1px solid var(--line);
    border-left: 6px solid var(--green);
    background: var(--g06);
    transition: background .2s, border-color .2s;
  }
  .disc:hover, .disc[aria-expanded="true"]{ background: var(--g12); }
  .disc:hover{ border-color: var(--g55); border-left-color: var(--green); }
  .disc-title{
    flex: 1 1 auto; min-width: 0;
    font-family:'Roboto Condensed', sans-serif;
    text-transform:uppercase;
    font-weight:700;
    font-size: 17px;
    letter-spacing:0.08em;
    color: var(--cream);
  }
  .disc-count{
    flex: none;
    font-family:'Roboto Mono', monospace;
    font-size: 11px;
    color: var(--gold);
    border: 1px solid var(--line);
    padding: 2px 8px;
  }
  .disc-act{
    flex: none;
    display:flex; align-items:center; gap: 8px;
    font-family:'Roboto Condensed', sans-serif;
    font-weight:600; font-size: 12px;
    letter-spacing:0.08em;
    text-transform:uppercase;
    color: var(--gold);
  }
  .chev{
    display:block;
    width: 8px; height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .25s var(--ease);
  }
  .disc[aria-expanded="true"] .chev{ transform: rotate(-135deg) translateY(-2px); }
  .disc-body{ margin-top: 20px; animation: fade .3s var(--ease); }
  .disc-body[hidden], #rec-body[hidden], .rec-lock[hidden]{ display:none !important; }
  .disc-hint{ font-size: 13px; color: var(--silver); margin-bottom: 12px; }
  .notes ul{
    list-style:none;
    display:flex;
    flex-direction:column;
    gap: 22px;
  }
  .notes li{
    position:relative;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 14.5px;
    line-height:1.55;
    color: var(--body-text);
    animation: rise linear backwards;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
  .notes li::before{
    content:"";
    position:absolute;
    left:0; top:-3px;
    width: 40px; height:5px;
    background: var(--green);
  }
  .notes li > b:first-child{
    display:block;
    margin-bottom: 5px;
    font-family:'Roboto Condensed', sans-serif;
    font-size: 17px;
    font-weight:700;
    letter-spacing:0.04em;
    text-transform:uppercase;
    color: var(--gold);
  }
  .notes li b{ color: var(--cream); }
  .notes .plink{ border-bottom: 1px dotted var(--c55); transition: color .15s; }
  .notes .plink:hover{ color: var(--gold); }

  /* RÉCORD ESPERADO */
  .record{ padding: 8px 40px 0; }

  /* Contexto 0–82 */
  .season-bar{
    position:relative;
    height: 10px;
    background: var(--c10);
    margin: 22px 0 6px;
  }
  .season-bar .band{
    position:absolute; top:0; bottom:0;
    background: var(--g55);
  }
  .season-bar .win{
    position:absolute; top:-4px; bottom:-4px;
    border: 1px solid var(--c55);
  }
  .season-scale{
    display:flex; justify-content:space-between;
    font-family:'Roboto Mono', monospace;
    font-size: 10px;
    color: var(--silver);
    margin-bottom: 22px;
  }

  /* Dot plot ampliado */
  .range{
    display:grid;
    grid-template-columns: 116px 1fr;
    column-gap: 14px;
  }
  .range .lbl-col{ display:flex; flex-direction:column; }
  .range .plot{ position:relative; }
  .range .row-lbl, .range .row{
    height: 42px;
    display:flex; align-items:center;
  }
  .range .row-lbl{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:600;
    font-size: 12.5px;
    letter-spacing:0.06em;
    text-transform:uppercase;
    color: var(--silver);
    justify-content:flex-end;
    text-align:right;
  }
  .range .row-lbl.avg{ color: var(--gold); font-weight:700; }
  .range .head{ height: 38px; }
  .range .row{ position:relative; border-bottom: 1px solid var(--c06); }
  .range .xband{
    position:absolute;
    top: 0; bottom: 22px;
    background: linear-gradient(180deg, var(--g18), var(--g06));
    border-left: 3px solid var(--gold);
    border-right: 3px solid var(--gold);
    animation: grow .8s var(--ease) .1s backwards;
  }
  .range .xband .edge{
    position:absolute; top: 5px;
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size: 11px;
    letter-spacing:0.1em;
    color: var(--gold);
    white-space:nowrap;
    padding: 0;
  }
  .range .xband .edge.lo{ left: 8px; }
  .range .xband .edge.hi{ right: 8px; text-align:right; }
  .range .xband .edge span{ display:block; font-family:'Roboto Mono', monospace; font-weight:500; color: var(--cream); font-size: 12px; letter-spacing:0; }
  .range .even{
    position:absolute; top:0; bottom:22px;
    border-left: 1px dashed var(--c35);
  }
  .range .dot{
    position:absolute;
    top:50%;
    transform: translate(-50%,-50%);
    width: 44px; height: 44px;
    display:flex; align-items:center; justify-content:center;
  }
  .range .dot i{
    display:block;
    width: 15px; height:15px;
    border-radius:50%;
    background: var(--cream);
    border: 2px solid var(--ink);
    box-shadow: 0 0 0 2px var(--cream);
    transition: transform .18s var(--ease);
    animation: pin .45s var(--ease) backwards;
  }
  .range .row:nth-child(3) .dot i{ animation-delay:.35s; }
  .range .row:nth-child(4) .dot i{ animation-delay:.45s; }
  .range .row:nth-child(5) .dot i{ animation-delay:.55s; }
  .range .row:nth-child(6) .dot i{ animation-delay:.65s; }
  .range .row:nth-child(7) .dot i{ animation-delay:.75s; }
  .range .row:nth-child(8) .dot i{ animation-delay:.85s; }
  .range .dot.avg i{ width:20px; height:20px; background: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
  .range .dot:hover i, .range .dot[aria-expanded="true"] i{ transform: scale(1.3); }
  .range .dot .v{
    position:absolute;
    left: calc(50% + 17px);
    font-family:'Roboto Mono', monospace;
    font-size: 12px;
    color: var(--cream);
    white-space:nowrap;
  }
  .range .axis{
    position:relative;
    height: 22px;
    font-family:'Roboto Mono', monospace;
    font-size: 10px;
    color: var(--silver);
  }
  .range .axis span{ position:absolute; top: 6px; transform: translateX(-50%); }

  .record-grid{
    display:grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 26px 0 10px;
  }
  .record-card{
    background: var(--g06);
    border: 1px solid var(--line);
    border-top: 4px solid var(--green);
    padding: 16px 10px 14px;
    text-align:center;
    animation: rise linear backwards;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
  .record-card.avg{
    background: var(--gold);
    border-color: var(--gold);
    border-top-color: var(--cream);
  }
  .record-card .portal{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:600;
    font-size: 11.5px;
    letter-spacing:0.12em;
    color: var(--silver);
    text-transform:uppercase;
  }
  .record-card .wl{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size: 34px;
    line-height: 1;
    color: var(--cream);
    margin-top: 8px;
  }
  .record-card .wl b{ color: var(--gold); }
  .record-card.avg .portal, .record-card.avg .wl{ color: var(--ink); }
  .record-card.avg .wl b{ color: var(--green-deep); }

  footer{
    padding: 24px 40px 38px;
    border-top: 8px solid var(--green);
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    flex-wrap:wrap;
    gap: 10px;
    margin-top: 30px;
  }
  footer .next{
    font-size: 13px;
    color: var(--silver);
    text-align:left;
  }
  footer .next b{
    color: var(--gold);
    font-family:'Roboto Condensed', sans-serif;
    font-size: 15px;
    letter-spacing: 0.04em;
  }
  footer .src{
    font-size: 11.5px;
    color: var(--silver);
    text-align:right;
    line-height:1.5;
  }

  /* ---- LA VOZ DEL LECTOR: marca TÚ (rombo crema) frente al dorado del experto ---- */
  .range .row-lbl.you{ color: var(--cream); font-weight:700; }
  .range .dot.you i{
    border-radius: 0;
    transform: rotate(45deg);
    width: 14px; height: 14px;
    background: var(--cream);
    box-shadow: none;
    border: 2px solid var(--ink);
    outline: 2px solid var(--cream);
    animation: none;
  }
  .range .dot.you:hover i, .range .dot.you[aria-expanded="true"] i{ transform: rotate(45deg) scale(1.3); }
  .season-bar .you{
    position:absolute; top:-5px; bottom:-5px;
    width: 2px;
    background: var(--cream);
  }
  .season-bar .you::after{
    content:"TÚ";
    position:absolute; top:-14px; left:50%;
    transform: translateX(-50%);
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700; font-size: 10px; letter-spacing:0.1em;
    color: var(--cream);
  }
  .tag.rev{ color: var(--cream); border-color: var(--c55); }
  .revic{ display:inline-block; vertical-align:-2px; margin-right:3px; flex:none; }

  /* ---- SECCIÓN: TU PORRA ---- */
  .forecast{ padding: 34px 40px 4px; }
  .fc-block{
    border: 1px solid var(--line);
    border-left: 6px solid var(--gold);
    background: var(--c06);
    padding: 20px 22px;
    margin-bottom: 14px;
    animation: rise linear backwards;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
  .fc-lbl{
    display:flex; align-items:center; gap: 12px;
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700; font-size: 19px;
    letter-spacing:0.02em;
    color: var(--cream);
    margin-bottom: 14px;
  }
  .fc-n{
    flex:none;
    width: 30px; height:30px;
    border: 2px solid var(--gold);
    color: var(--gold);
    display:flex; align-items:center; justify-content:center;
    font-family:'Roboto Mono', monospace;
    font-size: 13px; font-weight:700;
    transition: background .2s, color .2s;
  }
  .fc-wl{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700; font-size: 52px;
    color: var(--cream);
    line-height:1;
  }
  .fc-wl.unset{ font-family:'Roboto Mono', monospace; color: var(--silver); font-size: 16px; font-weight:500; }
  .fc-wl small{ font-family:'Roboto', sans-serif; font-size: 12px; font-weight:400; color: var(--silver); margin-left:10px; letter-spacing:0; }
  .fc-range{
    -webkit-appearance:none; appearance:none;
    width:100%; height: 48px;
    background: transparent;
    margin-top: 6px;
    cursor: pointer;
  }
  .fc-range::-webkit-slider-runnable-track{
    height: 8px;
    background:
      linear-gradient(90deg, transparent calc(50% - 1px), var(--gold) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
      var(--c18);
  }
  .fc-range::-moz-range-track{
    height: 8px;
    background:
      linear-gradient(90deg, transparent calc(50% - 1px), var(--gold) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
      var(--c18);
  }
  /* mando de mesa de mezclas */
  .fc-range::-webkit-slider-thumb{
    -webkit-appearance:none;
    margin-top: -14px;
    width: 16px; height: 36px;
    background: var(--cream);
    border: 3px solid var(--ink);
    border-radius:0;
    box-shadow: 0 0 0 2px var(--cream);
    transition: transform .15s var(--ease);
  }
  .fc-range::-moz-range-thumb{
    width: 10px; height: 30px;
    background: var(--cream);
    border: 3px solid var(--ink);
    border-radius:0;
    box-shadow: 0 0 0 2px var(--cream);
  }
  .fc-range:hover::-webkit-slider-thumb, .fc-range:active::-webkit-slider-thumb{ transform: scaleY(1.12); }
  .fc-range:focus-visible{ outline: 2px solid var(--gold); outline-offset: 4px; }
  .fc-scale{
    display:flex; justify-content:space-between;
    font-family:'Roboto Mono', monospace;
    font-size: 10.5px; color: var(--silver);
    margin-top: -2px;
  }
  .fc-vs{ font-size: 13px; color: var(--silver); margin-top: 12px; min-height: 18px; }
  .fc-vs b{ color: var(--gold); font-weight:500; }

  /* escalera de Playoffs: los peldaños suben */
  .ladder{ display:grid; grid-template-columns: repeat(6, 1fr); gap: 6px; align-items:end; }
  .step{
    display:flex; flex-direction:column; align-items:center; justify-content:space-between; gap: 10px;
    min-height: 88px;
    padding: 10px 4px 0;
    border: 1px solid var(--line);
    border-bottom: 0;
    text-align:center;
    font-family:'Roboto Condensed', sans-serif;
    font-size: 12.5px;
    line-height:1.2;
    color: var(--silver);
    cursor: pointer;
    transition: color .15s, background .15s, border-color .15s;
  }
  .step .bar{ order: 2; width: 100%; height: 6px; background: var(--c18); transition: background .15s; }
  .step:nth-child(2) .bar{ height: 12px; }
  .step:nth-child(3) .bar{ height: 18px; }
  .step:nth-child(4) .bar{ height: 24px; }
  .step:nth-child(5) .bar{ height: 30px; }
  .step:nth-child(6) .bar{ height: 36px; }
  .step:hover{ color: var(--cream); background: var(--c06); }
  .step:hover .bar{ background: var(--g55); }
  .step[aria-checked="true"]{
    background: var(--g12);
    border-color: var(--gold);
    color: var(--cream);
    font-weight:700;
  }
  .step[aria-checked="true"] .bar{ background: var(--gold); }
  .fc-note{
    display:flex; gap: 8px;
    font-size: 13px;
    color: var(--ink);
    background: var(--warn);
    padding: 8px 10px;
    margin-top: 12px;
  }
  .fc-note[hidden]{ display:none; }
  .fc-note button{ margin-left:auto; font-weight:700; flex:none; }

  .fc-rev{ display:flex; align-items:center; gap: 12px; flex-wrap:wrap; font-size: 14px; line-height:1.5; color: var(--silver); }
  .fc-rev .pick{
    display:flex; align-items:center; gap: 8px;
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700; font-size: 20px;
    color: var(--cream);
  }
  .fc-rev .pick .n{ font-family:'Roboto Mono', monospace; color: var(--gold); font-size: 14px; }

  .fc-actions{ display:flex; gap: 8px; flex-wrap:wrap; margin-top: 4px; }
  .fc-btn{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700; font-size: 13px; letter-spacing:0.08em; text-transform:uppercase;
    padding: 10px 18px;
    min-height: 44px;
    border: 1px solid var(--cream);
    color: var(--cream);
    transition: background .15s, color .15s, transform .1s;
  }
  .fc-btn:hover{ background: var(--cream); color: var(--ink); }
  .fc-btn:active, .pop-act:active{ transform: translateY(1px); }
  .fc-btn.ghost{ border-color: var(--c35); color: var(--silver); }
  .fc-btn.ghost:hover{ background: var(--c10); color: var(--cream); }
  .fc-msg{ font-size: 12.5px; color: var(--silver); margin-top: 10px; min-height: 16px; }
  .fc-msg input{
    width:100%;
    font-family:'Roboto Mono', monospace; font-size: 11px;
    color: var(--cream); background: var(--panel);
    border: 1px solid var(--line);
    padding: 8px;
    margin-top: 6px;
  }
  .pop-act{
    display:block; width:100%;
    margin-top: 10px;
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700; font-size: 13px; letter-spacing:0.06em; text-transform:uppercase;
    text-align:center;
    padding: 10px;
    min-height: 44px;
    border: 1px solid var(--cream);
    color: var(--cream);
    transition: background .15s, color .15s;
  }
  .pop-act:hover{ background: var(--cream); color: var(--ink); }
  .pop-act.on{ border-color: var(--c35); color: var(--silver); }

  /* ---- CIERRE DE LA PORRA y récord bloqueado ---- */
  .fc-intro{ font-size: 15px; line-height:1.55; color: var(--silver); margin: 4px 0 20px; max-width: 640px; }
  .fc-intro b{ color: var(--cream); font-weight:500; }
  .fc-n svg{ display:block; }
  .fc-block.done .fc-n{ background: var(--gold); color: var(--ink); }
  .fc-block.done{ border-left-color: var(--cream); }
  .rec-lock{
    display:flex; gap: 18px; align-items:flex-start;
    border: 2px dashed var(--line);
    background: var(--c06);
    padding: 22px;
    color: var(--gold);
  }
  .rec-lock svg{ flex:none; margin-top: 2px; width: 34px; height: 34px; }
  .rec-lock p{ font-size: 14px; line-height:1.5; color: var(--silver); margin-bottom: 8px; }
  .rec-lock p b{ color: var(--cream); font-weight:500; }
  .rec-lock .rec-lock-st{ color: var(--cream); font-weight:500; margin-bottom: 14px; }
  .record{ padding-top: 34px; }

  /* POPOVER — ficha de jugador y glosario */
  .pop{
    position:fixed;
    z-index: 50;
    width: 340px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    overflow:auto;
    background: var(--panel);
    border: 1px solid var(--gold);
    border-top: 5px solid var(--green);
    box-shadow: 0 16px 40px rgba(0,0,0,0.65);
    color: var(--cream);
    font-size: 13px;
    line-height: 1.45;
    animation: fade .16s var(--ease);
  }
  .pop[hidden]{ display:none; }
  .pop.small{ width: 280px; }
  .pop-head{
    display:flex; align-items:flex-start; gap: 12px;
    padding: 14px 44px 10px 16px;
    background: linear-gradient(90deg, var(--green-deep), transparent);
    border-bottom: 1px solid var(--line);
  }
  .pop-num{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size: 34px;
    color: var(--gold);
    line-height:.95;
  }
  .pop-name{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size: 21px;
    text-transform:uppercase;
    line-height:1.1;
  }
  .pop-sub{ font-size: 12px; color: var(--silver); margin-top: 3px; }
  .pop-title{
    font-family:'Roboto Condensed', sans-serif;
    font-weight:700;
    font-size: 16px;
    color: var(--gold);
    letter-spacing:0.04em;
    padding: 12px 44px 0 16px;
  }
  .pop-body{ padding: 10px 16px 4px; }
  .pop-close{
    position:absolute; top: 4px; right: 4px;
    width: 40px; height: 40px;
    font-size: 22px;
    color: var(--silver);
    display:flex; align-items:center; justify-content:center;
  }
  .pop-close:hover{ color: var(--cream); }
  .bio{
    display:grid;
    grid-template-columns: auto 1fr;
    gap: 3px 12px;
    font-size: 12.5px;
    margin-bottom: 10px;
  }
  .bio dt{ color: var(--silver); }
  .bio dd{ color: var(--cream); }
  .sgrid{
    display:grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--g18);
    border: 1px solid var(--g18);
    margin-bottom: 10px;
  }
  .sgrid div{
    background: var(--panel);
    padding: 6px 2px;
    text-align:center;
    display:flex; flex-direction:column;
  }
  .sgrid b{ font-family:'Roboto Condensed', sans-serif; font-size: 17px; color: var(--cream); font-weight:700; }
  .sgrid span{ font-size: 9.5px; letter-spacing:0.08em; color: var(--silver); text-transform:uppercase; }
  .pop .warnbox{
    font-size: 12px;
    color: var(--ink);
    background: var(--warn);
    padding: 6px 8px;
    margin-bottom: 10px;
  }
  .pop .muted{ color: var(--silver); font-size: 12px; }
  .pop-foot{
    padding: 8px 16px 12px;
    font-size: 11px;
    color: var(--silver);
    border-top: 1px solid var(--g18);
    margin-top: 4px;
  }
  .pop-foot b{ color: var(--gold); font-weight:500; }
  .scrim{
    position:fixed; inset:0;
    background: rgba(0,0,0,0.55);
    z-index: 40;
  }
  .scrim[hidden]{ display:none; }

  @media (max-width: 620px){
    body{ padding: 0; }
    .sheet{ border:0; }
    header{ padding: 26px 22px 26px; min-height: 0; border-bottom-width: 6px; }
    header::before{ background:
      repeating-radial-gradient(circle at 78% 22%, transparent 0 30px, var(--g18) 30px 31px),
      radial-gradient(circle at 78% 22%, var(--team-wash), transparent 55%);
      -webkit-mask-image: radial-gradient(circle at 78% 22%, black 0, black 20%, transparent 62%);
              mask-image: radial-gradient(circle at 78% 22%, black 0, black 20%, transparent 62%); }
    .team-logo{ position:static; height:156px; max-width: 58%; object-position: right center; }
    .logo-row{ margin-bottom: 22px; align-items:flex-start; }
    .nba-logo{ height:40px; }
    .subhead{ font-size: 16.5px; margin-top: 20px; }
    .court-wrap{ padding: 34px 14px 12px; }
    .court{ box-shadow: 5px 5px 0 var(--g18); border-width: 2px; }
    .roster, .notes, .rest, .record, .forecast{ padding-left:22px; padding-right:22px; }
    .roster-title, .record-title{ font-size: 25px; }
    .notes-body{ grid-template-columns: 1fr; }
    .disc{ flex-wrap: wrap; gap: 8px 12px; padding: 12px 14px; }
    .disc-title{ flex: 1 1 100%; letter-spacing: 0.06em; }
    .disc-act{ margin-left: auto; }
    .rec-lock{ padding: 16px; gap: 14px; }
    .rest-grid{ columns: 1; }
    .rest{ --bench-cols: 28px minmax(0,1fr) 44px 34px 46px; }
    .rest-head{ grid-template-columns: 1fr; }
    .rest-head .hd:nth-child(2){ display:none; }
    .rest-head .hd, .rest-item{ gap: 6px; }
    .record-grid{ grid-template-columns: 1fr 1fr; }
    .card{ grid-template-columns: 62px 1fr; gap: 6px 14px; padding: 20px 6px 20px 2px; }
    .card .badge{ font-size: 56px; }
    .card .stats{ grid-column: 1 / -1; justify-content:flex-start; margin-top:10px; margin-left: 76px; }
    .card .stats > div{ min-width: 58px; padding: 2px 14px; }
    .card .stats > div:first-child{ padding-left: 0; }
    .card .info .name{ font-size: 23px; }
    footer{ padding-left:22px; padding-right:22px; flex-direction:column; align-items:flex-start; text-align:left; }
    footer .src{ text-align:left; }
    .player-dot .num{ width:42px; height:42px; font-size:20px; border-width:2px; }
    .player-dot:has(.pname.star) .num{ width: 48px; height: 48px; font-size: 23px; }
    .player-dot:has(.pname.star) .num::after{ inset:-6px; }
    .player-dot .pname{ font-size:11.5px; margin-top:4px; padding: 1px 5px; }
    .player-dot .ppos{ font-size:9.5px; }
    .range{ grid-template-columns: 78px 1fr; column-gap: 8px; }
    .range .row-lbl{ font-size: 10.5px; }
    .range .dot .v{ display:none; }
    .range .xband .edge{ font-size: 10px; }
    .range .xband .edge span{ font-size: 11px; }
    /* Ficha como hoja inferior */
    .pop{
      left: 0 !important; right: 0; bottom: 0; top: auto !important;
      width: 100%; max-width: none;
      max-height: 78vh;
      border-left:0; border-right:0; border-bottom:0;
      animation: slideup .22s var(--ease);
    }
    .pop.small{ width:100%; }
    .forecast{ padding-top: 26px; }
    .fc-block{ padding: 16px 14px; }
    .fc-lbl{ font-size: 18px; }
    .ladder{ grid-template-columns: repeat(2, 1fr); }
    .step{ min-height: 70px; font-size: 13px; }
    .fc-wl{ font-size: 44px; }
    .fc-actions .fc-btn{ flex: 1 1 auto; }
    .fc-rev .fc-btn{ padding: 8px 12px; }
  }

  /* Sin movimiento: todo queda quieto y visible */
  @media (prefers-reduced-motion: reduce){
    *, *::before, *::after{ animation: none !important; transition: none !important; }
  }

  /* Impresión (botón Imprimir y PDF; ?print la reproduce en pantalla): A4 con el mismo aspecto que la web,
     todo desplegado hasta «Claves» y sin la porra ni el récord esperado (que depende de ella). */
  @media print{
    @page{ size: A4; margin: 12mm 0; }
    *{ -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    *, *::before, *::after{ animation: none !important; transition: none !important; }
    html, body{ background: var(--ink) !important; }
    body{ display:block; padding: 0 !important; }
    body::before{ content:""; position:fixed; inset: -20mm 0; background: var(--ink); z-index:-1; }   /* fondo oscuro en todas las hojas, también bajo el final */
    .sheet{ max-width:none; border:0; }
    .forecast, .record, .scrim, .pop, .rec-lock, .disc-act, .disc-hint, .hint, .chips, .print-btn{ display:none !important; }
    .disc-body[hidden]{ display:block !important; }
    .notes-body[hidden]{ display:grid !important; }
    .rest-item[hidden]{ display:grid !important; }                      /* el filtro de posición no se imprime: salen todos */
    .rest-head .hd{ visibility: visible !important; }
    .disc{ border:0 !important; background:none !important; padding:0 0 10px !important; pointer-events:none; border-bottom:1px solid var(--line) !important; }
    /* cada bloque entero en su hoja: la tabla del banquillo y las claves no se parten */
    header, .court-wrap, .card, .rest, .notes, .notes li, footer{ break-inside: avoid; }
    .roster-title, .disc, .rest-head{ break-after: avoid; }
    /* 4 hojas fijas: 1 portada con la pista · 2 quinteto · 3 resto de la plantilla · 4 claves + pie */
    .court-wrap{ padding: 28px 90px 12px; }   /* pista algo más estrecha para que quepa bajo la cabecera */
    .roster, .rest, .notes{ break-before: page; }
    body .notes{ padding-top: 16px; }                 /* hasta 7 claves + pie caben en la hoja 4 */
    body .notes-body{ row-gap: 16px; }
    body .notes li::before{ font-size: 58px; margin-bottom: 6px; }
    body footer{ margin-top: 10px; padding: 16px 40px 20px; }
  }
  html.print-mode *, html.print-mode *::before, html.print-mode *::after{ animation: none !important; }
  html.print-mode .forecast, html.print-mode .record, html.print-mode .scrim, html.print-mode .pop, html.print-mode .rec-lock,
  html.print-mode .disc-act, html.print-mode .disc-hint, html.print-mode .hint, html.print-mode .chips, html.print-mode .print-btn{ display:none !important; }
  html.print-mode .disc{ border:0 !important; background:none !important; padding:0 0 10px !important; pointer-events:none; border-bottom:1px solid var(--line) !important; }

  /* ================= ITERACIÓN 2 ================= */
  :root{
    /* Franja: tinte oscuro del equipo + texto --cream (>=7:1 en las 17 paletas) y filete --gold para que se vea aunque --green sea casi negro.
       buildTeam.py: calcular por equipo si hace falta */
    --band-bg: linear-gradient(100deg, color-mix(in srgb, var(--green) 38%, var(--ink)) 0 55%, color-mix(in srgb, var(--green) 62%, var(--ink)) 100%);
    --ui: color-mix(in srgb, var(--gold) 58%, transparent); --ink-70: color-mix(in srgb, var(--ink) 74%, transparent); }
  .court > svg .c-line, .court > svg .c-rim, .court > svg .c-out{ vector-effect: non-scaling-stroke; }
  .court > svg .c-line{ stroke-width: 3px; } .court > svg .c-rim{ stroke-width: 3px; }

  /* Cabecera: el escudo corta la composición y el título pasa por delante */
  /* El escudo ocupa una caja cuadrada fija; el texto nunca entra en ella.
     --name-len = caracteres de la línea más larga del h1, ciudad o equipo (buildTeam.py lo calcula por equipo).
     0,56 em por carácter: las mayúsculas anchas («LOS ANGELES») ocupan más que la media. */
  /* El escudo queda dentro del margen derecho (40px), con 24px de aire hasta el texto */
  header{ container-type: inline-size; --logo: clamp(170px, 29cqw, 260px); --room: calc(100cqw - var(--logo) - 24px); }
  .team-logo{ right: 40px; top: 30px; width: var(--logo); height: var(--logo); max-width: none; z-index:0; }
  header h1{ position:relative; z-index:2; font-size: min(104px, calc(var(--room) / (var(--name-len) * .56))); }
  @media (min-width: 621px){
    header .season-tag, header h1, header .subhead, header .hint{ max-width: var(--room); }
    header h1{ max-width: none; }
  }
  
  header .season-tag, header .subhead, header .hint, header .print-btn{ position:relative; z-index:2; }

  /* Franjas a sangre en el color del equipo (texto --ink sobre --green: 4,57:1, y es grande y en negrita) */
  .roster-title, .record .record-title{
    margin-left: -40px; margin-right: -40px;
    padding: 14px 40px 14px;
    background: var(--band-bg);
    color: var(--cream);
    border: 0;
    border-top: 5px solid var(--gold);
    border-bottom: 3px solid var(--green);
    text-wrap: balance;
  }
  .roster-title small, .record .record-title small{ color: var(--cream); font-weight:500; }
  .roster{ padding-top: 0; }
  .record{ padding-top: 40px; }
  .roster-title{ margin-bottom: 18px; }

  /* Claves: numeración gigante */
  .notes-body{ counter-reset: clave; gap: 26px 40px; }
  .notes li{ counter-increment: clave; border-top: 0; padding-top: 0; }
  .notes li::before{
    content: counter(clave, decimal-leading-zero);
    position:static; display:block; width:auto; height:auto; background:none;
    font-family:'Roboto Condensed', sans-serif; font-weight:700;
    font-size: 76px; line-height: .85; letter-spacing:-0.02em;
    color: transparent; -webkit-text-stroke: 2px var(--gold);
    margin-bottom: 8px;
  }
  .notes .disc{ background: var(--team-wash); border-color: var(--green); }
  .notes .disc:hover, .notes .disc[aria-expanded="true"]{ background: color-mix(in srgb, var(--green) 45%, transparent); }

  /* Tu porra: bloque invertido sobre --cream */
  .forecast{
    background: var(--cream); color: var(--ink);
    margin-top: 40px; padding-top: 14px; padding-bottom: 30px;
    border-top: 8px solid var(--green);
  }
  .forecast .record-title{ color: var(--ink); background: none; border-top: 0; border-bottom: 3px solid var(--ink); padding: 18px 0 12px; margin: 10px 0 16px; }
  .forecast .record-title small{ color: var(--ink-70); }
  .forecast .fc-intro{ color: var(--ink-70); font-size: 15.5px; }
  .forecast .fc-intro b{ color: var(--ink); font-weight:700; }
  .forecast .fc-block{ background: var(--ink); border: 0; border-top: 5px solid var(--green); box-shadow: 6px 6px 0 var(--ink-70); margin-bottom: 20px; }
  .forecast .fc-block.done{ border-top-color: var(--gold); }
  .forecast .fc-btn{ border-color: var(--ink); color: var(--ink); }
  .forecast .fc-btn:hover{ background: var(--ink); color: var(--cream); }
  .forecast .fc-btn.ghost{ border-color: var(--ink-70); color: var(--ink-70); }
  .forecast .fc-btn.ghost:hover{ background: var(--ink); color: var(--cream); }
  .forecast .fc-msg{ color: var(--ink-70); }
  .forecast .fc-block .fc-btn{ border-color: var(--cream); color: var(--cream); }
  .forecast .fc-block .fc-btn:hover{ background: var(--cream); color: var(--ink); }
  .forecast .fc-block .fc-btn.ghost{ border-color: var(--c55); color: var(--silver); }
  .fc-wl.unset{ font-size: 13px; }
  .fc-rev:not(:has(.pick)){ display:block; }

  /* Récord: el mini-eje y el gráfico forman una sola figura */
  #rec-body{ background: var(--c06); border: 1px solid var(--line); border-top: 4px solid var(--gold); padding: 26px 22px 18px; }
  .season-bar{ margin-top: 28px; height: 12px; }
  .season-scale{ font-size: 11px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
  .range .axis{ font-size: 11px; color: var(--cream); }
  .range .row-lbl{ font-size: 13px; }

  /* Accesibilidad: bordes de control a 3:1, textos mínimos */
  .tag.new, .fc-btn.ghost, .pop-act.on{ border-color: var(--c55); }
  .chip, .step, .print-btn, .disc{ border-color: var(--ui); }
  .tag, .award{ font-size: 11px; }
  .card .stats .lbl, .fc-scale{ font-size: 11px; }
  .sgrid span{ font-size: 10.5px; }
  .player-dot .ppos{ font-size: 11px; }

  @media (max-width: 620px){
    header{ --logo: 124px; --room: calc(100cqw - 44px); }
    .team-logo{ position:absolute; top: 22px; right: 22px; width: 124px; height: 124px; max-width:none; }
    .logo-row{ min-height: 116px; }
    header h1{ font-size: min(60px, calc(var(--room) / (var(--name-len) * .56))); }
    header::before{ opacity:1; }
    .logo-row{ margin-bottom: 4px; }
    .roster-title, .record .record-title{ margin-left:-22px; margin-right:-22px; padding-left:22px; padding-right:22px; }
    .forecast .record-title{ margin-left:0; margin-right:0; }
    .notes li::before{ font-size: 64px; }

    /* Pista en móvil: medidas, formas y tamaños de texto del diseño original (las mismas posiciones que en escritorio).
       De la versión nueva solo se quedan la textura de la pista y los efectos de la estrella (círculo dorado y onda). */
    .court-wrap{ padding: 30px 14px 10px; }
    .court{ aspect-ratio: 860/500; border-width: 3px; box-shadow: none; }
    .player-dot .num{
      width:40px; height:40px; border-width:2px;
      font-family:'Roboto Mono', monospace; font-size:15px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    }
    .player-dot:hover .num{ box-shadow: 0 2px 8px rgba(0,0,0,0.35); }
    .player-dot:has(.pname.star) .num{ width:40px; height:40px; font-size:15px; }
    .player-dot:has(.pname.star) .num::after{ inset:-6px; }
    .player-dot .pname{
      margin-top:4px; padding:0; background:none;
      font-weight:600; font-size:11.5px; letter-spacing:0;
      text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    }
    .player-dot .pname.star{ background: var(--gold); color: var(--ink); text-shadow:none; font-weight:700; padding: 1px 8px; border-radius: 2px; }
    .player-dot .ppos{ margin-top:1px; padding:0; background:none; font-weight:400; font-size:9.5px; letter-spacing:0.12em; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
    .player-dot .keyic{ width:14px; height:14px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.7)); }

    /* Tarjetas: dorsal fantasma a la derecha y estadísticas a ancho completo */
    .card{ grid-template-columns: 1fr; padding: 24px 4px; }
    .card .badge{ position:absolute; top: 14px; right: -2px; font-size: 84px; line-height:.8; opacity:.26; padding:0; min-width:44px; min-height:44px; z-index:0; }
    .card .badge:hover{ opacity:.6; transform:none; }
    .card .info{ position:relative; z-index:1; padding-right: 40px; }
    .tie{ white-space:nowrap; }
    .card .stats{ grid-column: auto; margin: 14px 0 0; display:grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); padding-top: 12px; }
    .card .stats > div, .card .stats > div:first-child{ min-width:0; padding: 0 6px; }
    .card .stats > div:first-child{ padding-left:0; }

    /* Objetivos táctiles de 44 px */
    .legend .who, .print-btn, .chip, button.sorth, .sorth{ min-height: 44px; }
    .pop-close{ width:44px; height:44px; }
    .legend .tip{ min-height: 44px; }
    .forecast{ padding-left:22px; padding-right:22px; }
    .forecast .fc-block{ box-shadow: 4px 4px 0 var(--ink-70); }
    #rec-body{ padding: 22px 14px 14px; }
  }
