  /* ---------- CABLE WRAP: the clock is the monitor readout, the button is the one big thing to hit ---------- */
  #wrScreen{--tool:#F59E4C;}
  .wr-layout{display:flex;flex-direction:column;gap:18px;}
  .wr-clock{display:flex;flex-direction:column;gap:14px;}
  .wr-clock .rc-results{display:block;}
  .wr-card{text-align:center;padding:22px 18px 20px !important;}
  .wr-time{font-family:var(--num);font-weight:700;font-size:clamp(58px, 19vw, 96px);line-height:1.05;color:#fff;font-variant-numeric:tabular-nums;letter-spacing:1px;margin:8px 0 6px;}
  .wr-result{min-height:22px;font-size:14px;font-weight:600;color:var(--mon-dim);}
  .wr-result[data-kind="best"]{color:var(--tape-green);}
  .wr-result[data-kind="slow"]{color:#F5B97A;}
  .wr-result[data-kind="first"]{color:var(--tape-blue);}
  .wr-clock .rc-grid{display:grid;}

  /* start / stop: big enough to slap with a cable in the other hand */
  .wr-go{width:100%;min-height:120px;border-radius:22px;font-family:var(--num);font-size:34px;font-weight:700;letter-spacing:1px;
    background:var(--guide);color:#1B1F27;box-shadow:0 6px 0 #C9A21E;touch-action:manipulation;-webkit-user-select:none;user-select:none;}
  .wr-go:active{transform:translateY(4px);box-shadow:0 2px 0 #C9A21E;}
  .wr-go[data-state="run"]{background:#E5484D;color:#fff;box-shadow:0 6px 0 #A8292D;}
  .wr-go[data-state="run"]:active{box-shadow:0 2px 0 #A8292D;}
  .wr-go[data-state="count"]{background:var(--mon-2);color:#fff;box-shadow:0 6px 0 #14171C;}
  .wr-undo{align-self:center;font-size:14px;}

  .wr-side{min-width:0;}
  #wrScreen .seg{background:#E6E9EE;}
  .wr-side .lk-sec:first-child{margin-top:4px;}
  .wr-seg{grid-auto-flow:row;grid-template-columns:repeat(auto-fill, minmax(84px, 1fr));}
  .wr-seg + .wr-seg{margin-top:8px;}
  .wr-len{grid-template-columns:repeat(auto-fill, minmax(60px, 1fr));}
  /* while the clock runs the cable can't be changed */
  .wr-busy .wr-seg,.wr-busy #wrCount{opacity:.45;pointer-events:none;}

  .wr-list{list-style:none;margin:0;padding:0;border:1.5px solid var(--line);border-radius:16px;background:#fff;overflow:hidden;}
  .wr-list li{display:flex;align-items:center;gap:12px;padding:6px 6px 6px 14px;min-height:48px;border-top:1px solid var(--line);}
  .wr-list li:first-child{border-top:0;}
  .wr-list b{font-family:var(--num);font-size:20px;font-variant-numeric:tabular-nums;}
  .wr-n{width:26px;color:var(--ink-3);font-size:13px;font-variant-numeric:tabular-nums;}
  .wr-d{flex:1;text-align:right;color:var(--ink-3);font-size:13px;white-space:nowrap;}
  .wr-del{width:44px;height:44px;border-radius:12px;color:var(--ink-3);font-size:22px;line-height:1;flex:none;}
  .wr-list li.is-best{background:#EAF8F0;box-shadow:inset 5px 0 0 var(--tape-green);}
  .wr-list li.is-best b::after{content:'ดีสุด';margin-left:8px;padding:2px 7px;border-radius:2px;background:var(--tape-green);color:#1B1F27;font-family:inherit;font-size:11px;font-weight:700;vertical-align:3px;}
  .wr-list li.is-new:not(.is-best){background:#FFF9E3;box-shadow:inset 5px 0 0 var(--guide);}
  .wr-list .wr-empty{color:var(--ink-3);font-size:14px;justify-content:center;}
  .wr-foot{font-size:13px;margin:12px 2px 24px;line-height:1.5;}

  /* who is wrapping: name chips, the chosen one in ink */
  .wr-sec-row{display:flex;align-items:center;justify-content:space-between;gap:10px;}
  .wr-sec-row .link{font-size:14px;margin-top:12px;}
  .wr-who{display:flex;flex-wrap:wrap;gap:8px;}
  .wr-person{position:relative;min-height:44px;padding:0 16px;border-radius:999px;background:#E6E9EE;color:var(--ink-2);font-weight:600;font-size:15px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .wr-person[aria-pressed="true"]{background:var(--ink);color:var(--on-ink);}
  .wr-add{background:transparent;border:1.5px dashed var(--line-2, #C9CED6);color:var(--ink-2);}
  .wr-x{display:inline-grid;place-items:center;width:22px;height:22px;margin:0 -6px 0 8px;border-radius:50%;background:#E5484D;color:#fff;font-size:15px;line-height:1;vertical-align:1px;}

  /* ranking: place in a tab of tape, gold/silver/bronze for the first three */
  .wr-rank li{cursor:pointer;padding-right:14px;}
  .wr-rank li.is-me{background:#FFF9E3;}
  .wr-place{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:3px;background:#E6E9EE;font-weight:700;font-size:14px;flex:none;transform:rotate(-3deg);}
  .wr-place[data-place="1"]{background:var(--guide);}
  .wr-place[data-place="2"]{background:#D5DAE1;}
  .wr-place[data-place="3"]{background:#F0C69A;}
  .wr-name{flex:1;min-width:0;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .wr-rank .wr-d{flex:none;}

  /* stats: plain paper grid + a chart, higher = faster */
  .wr-stats{border:1.5px solid var(--line);border-radius:16px;background:#fff;padding:12px 14px;}
  .wr-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px;}
  .wr-stat-grid div{min-width:0;}
  .wr-stat-grid span{display:block;font-size:12.5px;color:var(--ink-3);}
  .wr-stat-grid b{font-size:16px;font-variant-numeric:tabular-nums;}
  .wr-chart{display:block;width:100%;height:96px;margin-top:14px;overflow:visible;}
  .wr-chart-line{fill:none;stroke:var(--tool);stroke-width:2.5;stroke-linejoin:round;vector-effect:non-scaling-stroke;}
  .wr-chart-best{stroke:var(--tape-green);stroke-width:1.5;stroke-dasharray:5 4;vector-effect:non-scaling-stroke;}
  .wr-chart circle{fill:#fff;stroke:var(--tool);stroke-width:2;vector-effect:non-scaling-stroke;}
  .wr-chart circle.is-best{fill:var(--tape-green);stroke:#1B1F27;}
  .wr-chart-cap{display:flex;justify-content:space-between;gap:8px;font-size:11.5px;color:var(--ink-3);margin-top:4px;}
  .wr-chart-cap span:nth-child(2){text-align:center;}
  .wr-none{margin:2px 0;font-size:14px;}

  /* timing: the clock and the Stop button fill the screen, nothing else, no scrolling */
  html.wr-lock,html.wr-lock body{overflow:hidden;overscroll-behavior:none;height:100%;}
  #wrScreen.wr-busy .wr-clock{position:fixed;inset:0;z-index:60;background:var(--bg);display:flex;flex-direction:column;gap:16px;
    padding:max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));touch-action:none;}
  #wrScreen.wr-busy .rc-results{flex:1;display:flex;flex-direction:column;min-height:0;}
  #wrScreen.wr-busy .wr-card{flex:1;display:flex;flex-direction:column;justify-content:center;}
  #wrScreen.wr-busy .wr-time{font-size:clamp(72px, 24vw, 220px);}
  #wrScreen.wr-busy .rc-grid{flex:none;}
  #wrScreen.wr-busy .wr-go{flex:none;min-height:34vh;min-height:34dvh;font-size:48px;}
  #wrScreen.wr-busy .wr-undo{display:none;}
  @media (max-height:560px){ #wrScreen.wr-busy .rc-grid{display:none;} #wrScreen.wr-busy .wr-go{min-height:40vh;} }

  @media (min-width:900px){
    #wrScreen.screen{max-width:1100px;}
    .wr-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:start;}
    .wr-clock{position:sticky;top:16px;}
    #wrScreen.wr-busy .wr-clock{padding:24px max(24px, calc(50vw - 360px));}
  }
