    :root{
      --bg:#fafafa; --card:#fff; --text:#111; --muted:#666; --border:#e6e6e6;
      --hand-fill: rgba(40, 90, 220, 0.22);   --hand-stroke: rgba(40, 90, 220, 0.95);
      --foot-fill: rgba(240, 140, 20, 0.22);  --foot-stroke: rgba(240, 140, 20, 0.95);
      --start-fill: rgba(10, 160, 90, 0.22);  --start-stroke: rgba(10, 160, 90, 0.98);
      --finish-fill: rgba(235, 70, 160, 0.22);--finish-stroke: rgba(235, 70, 160, 0.98);
    }
    body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; margin:0; background:var(--bg); color:var(--text); }
    .wrap{ max-width:820px; margin:0 auto; padding:16px; }
    header{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
    h1{ font-size:1.2rem; margin:0; }
    .btn{
      appearance:none; border:1px solid var(--border); background:var(--card);
      border-radius:10px; padding:10px 12px; font-size:1rem; cursor:pointer;
    }
    .btn.primary{ background:#111; color:#fff; border-color:#111; }
    .btn.small{ padding:8px 10px; font-size:0.95rem; }
    .btn:disabled{ opacity:.5; cursor:not-allowed; }

    .card{
      background:var(--card); border:1px solid var(--border); border-radius:14px;
      padding:14px; box-shadow:0 1px 2px rgba(0,0,0,0.04);
    }
    .muted{ color:var(--muted); }
    .small{ font-size:0.9rem; }
    label{ display:block; font-size:0.9rem; color:var(--muted); margin:10px 0 6px; }
    input, select, textarea{
      width:100%; box-sizing:border-box; font-size:1rem;
      padding:10px 12px; border-radius:10px; border:1px solid var(--border); background:#fff;
    }
    textarea{ min-height:90px; resize:vertical; }
    .row{ display:flex; gap:10px; flex-wrap:wrap; }
    .row > *{ flex:1; min-width:180px; }
    .toprow{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }

    /* List rows */
    .listRow{
      border-top:1px solid var(--border);
      padding:12px 0;
      cursor:pointer;
      user-select:none;
    }
    .listRow:first-child{ border-top:none; padding-top:0; }
    .rowMain{
      display:grid;
      grid-template-columns: 1fr auto;
      align-items:center;
      gap:10px;
    }
    .nameBold{ font-weight:700; }
    .gradeBold{ font-weight:800; font-size:1.05rem; }
    .stars{ display:inline-flex; gap:4px; justify-content:center; }
    .star{ font-size:18px; line-height:1; opacity:0.25; }
    .star.on{ opacity:1; }
    .rowMid{
      margin-top:6px;
      display:flex;
      align-items:center;
      justify-content:center;
      min-height:22px;
    }
    .rowMeta{
      margin-top:6px;
      display:flex;
      justify-content:flex-end;
      gap:10px;
      color:var(--muted);
      font-size:0.9rem;
    }

    /* Grade colors */
    .g-green{ color: rgb(10,160,90); }
    .g-blue{ color: rgb(40,90,220); }
    .g-orange{ color: rgb(240,140,20); }
    .g-red{ color: rgb(200,50,50); }

    hr{ border:none; border-top:1px solid var(--border); margin:14px 0; }

    /* Filters toggle area */
    .filtersHeader{ display:flex; justify-content:space-between; align-items:center; gap:10px; }
    .filtersPanel{ margin-top:10px; border:1px solid var(--border); border-radius:12px; padding:12px; background:#fff; }
    .taggrid{ display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; }
    .tagbtn{
      padding:8px 10px; border-radius:999px; border:1px solid var(--border);
      background:#fff; cursor:pointer;
    }
    .tagbtn.active{ background:#111; color:#fff; border-color:#111; }

    /* Wall */
    .wall{
      margin-top:10px; border-radius:14px; border:1px solid var(--border);
      overflow:hidden; background:#eee;
    }
    .wallhead{
      display:flex; align-items:center; justify-content:space-between;
      padding:10px 12px; background: rgba(255,255,255,0.75);
      border-bottom:1px solid var(--border); gap:8px;
    }
    svg{ display:block; width:100%; height:auto; touch-action: auto; }
    
    .hold{ cursor:pointer; }
    .hold .label{ font-size:14px; fill: rgba(0,0,0,0.75); user-select:none; pointer-events:none; }


    /* base outline for non-involved holds */
    .hold .shape{
    fill: transparent;
    stroke: rgba(80,80,80,0.35);
    stroke-width: 2.5;
    }

    /* thicker role outlines */
    .hold.hand .shape   { stroke: var(--hand-stroke);   stroke-width: 7; }
    .hold.foot .shape   { stroke: var(--foot-stroke);   stroke-width: 7; }
    .hold.start .shape  { stroke: var(--start-stroke);  stroke-width: 8; }
    .hold.finish .shape { stroke: var(--finish-stroke); stroke-width: 8; }
    .seg{ display:flex; gap:8px; flex-wrap:wrap; }

    .seg button{
      flex:1; min-width:140px;
      padding:10px 10px; border-radius:999px;
      border:1px solid var(--border); background:#fff;
      font-size:0.95rem; cursor:pointer;
    }
    .seg button.active{ background:#111; color:#fff; border-color:#111; }

    .legend{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
    .swatch{ display:inline-flex; align-items:center; gap:6px; }
    .dot{ width:12px; height:12px; border-radius:999px; border:2px solid rgba(0,0,0,0.2); }
    .dot.hand{ background:var(--hand-fill); border-color:var(--hand-stroke); }
    .dot.foot{ background:var(--foot-fill); border-color:var(--foot-stroke); }
    .dot.start{ background:var(--start-fill); border-color:var(--start-stroke); }
    .dot.finish{ background:var(--finish-fill); border-color:var(--finish-stroke); }

    /* Fullscreen tweaks */
    .fsTarget:fullscreen{ background:#000; padding:0; }
    .fsTarget:fullscreen .wall{ border:none; border-radius:0; }
    .fsTarget:fullscreen .wallhead{ border-radius:0; }
    .fsTarget:fullscreen svg{ max-height: 100vh; width: 100vw; height: 100vh; }
.listRow{
  display: flex;
  gap: 12px;
  align-items: stretch;      /* key: makes left thumb fill row height */
  padding: 5px 6px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  margin-top: 5px;

  height: 150px;             /* choose your row height */
}

.thumbWrap{
  height: 100%;             /* fill the row vertically */
  aspect-ratio: 1 / 1;      /* keep it square */
  flex: 0 0 auto;

  border-radius: 12px;
  background: #fff;
  border: 1px solid #eee;
  overflow: hidden;

  display: grid;
  place-items: center;
}

.thumbSvg{
  width: 100%;
  height: 100%;
  display: block;
}

/* optional: give text area room and prevent overflow */
.rowText{
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* gray outlines for all holds */
.thumbOutline{
  fill: none;
  stroke: #cfcfcf;
  stroke-width: 2;
  stroke-linejoin: round;
}

/* active outlines */
.thumbActive{
  fill: none;
  stroke-width: 3;
  stroke-linejoin: round;
}

/* Make the fullscreen target truly fill the screen */
.fsTarget:fullscreen{
  width: 100vw;
  height: 100vh;
  background: #fff;
  margin: 0;
  padding: 0;
  overflow: hidden; /* ok: we will size svg correctly */
  display: flex;
}

/* Ensure the wall container fills the fullscreen target */
.fsTarget:fullscreen .wall{
  flex: 1 1 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Put header on top, svg takes the rest */
.fsTarget:fullscreen .wallhead{
  flex: 0 0 auto;
  padding: 10px 12px;
}

/* Critical: svg must be allowed to grow/shrink and NOT have a fixed height */
.fsTarget:fullscreen svg{
  flex: 1 1 auto;
  min-height: 0;      /* critical inside flex columns */
  width: 100%;
  height: 100%;
  display: block;
}

/* Only show these in fullscreen */
.fsNav{ display:none; }
.fsTarget:fullscreen .fsNav{
  display:block;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.fsTarget:fullscreen .fsNavBtn{
  pointer-events: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid #e6e6e6;
  background: rgba(255,255,255,0.9);
  font-size: 20px;
}
.fsTarget:fullscreen .fsNavBtn.left{ left: 12px; }
.fsTarget:fullscreen .fsNavBtn.right{ right: 12px; }

.fsTarget{
  position: relative;
}



/* match your role colors (tweak if you want) */
.thumbActive.start  { stroke: #22c55e; }
.thumbActive.hand   { stroke: #3b82f6; }
.thumbActive.foot   { stroke: #f59e0b; }
.thumbActive.finish { stroke: #ec4899; }
