/* Fixture congestion (lib/rest-days.js) in the instrument finish. The real stylesheet (lib/rest-days.css)
   keeps the grid geometry; this layer replaces its fixed colours with the workspace tokens so the calendar
   follows dark and light: rest gaps are lit bars (short rest red, long rest green, the FDR palette),
   matches are small keys, gameweeks sit on metal plates. Loads after lib/rest-days.css. */
html #restDays{--rest-r1:var(--fdr5);--rest-r2:var(--fdr4);--rest-r3:color-mix(in oklab,var(--warn) 70%,var(--fdr3));--rest-r4:var(--fdr2);--rest-r5:var(--fdr1);--rest-row:38px}

/* toolbar: a tray of wells and keys */
html #restDays .kft-rest-controls{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:10px 12px;margin:0 0 12px;border-radius:12px;background:var(--tray)!important;border:1px solid var(--tray-edge)!important;box-shadow:inset 0 2px 5px #0005,inset 0 -1px #ffffff0c!important}
[data-theme=light] html #restDays .kft-rest-controls,html[data-theme=light] #restDays .kft-rest-controls{box-shadow:inset 0 2px 4px #0002,inset 0 -1px #fff!important}
html #restDays .kft-field{display:inline-flex;align-items:center;gap:8px;font:700 11px Manrope;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
html #restDays .kft-field select{min-height:34px;padding:0 10px;border-radius:8px;background:var(--well);border:1px solid var(--well-edge);box-shadow:inset 0 2px 4px #0004;color:var(--ink);font:600 13px Manrope;letter-spacing:0;text-transform:none}
html #restDays .kft-rest-mine-toggle[aria-pressed=true]{color:var(--accent-ink)!important;background:linear-gradient(var(--acc-top),var(--acc-mid) 48%,var(--acc-bot))!important;border-color:var(--acc-edge)!important}
html #restDays .kft-rest-caption{margin:0 0 10px;font:600 12.5px/1.5 Manrope;color:var(--muted)}

/* the calendar panel */
html #restDays .kft-rest-wrap{border-radius:14px!important;border:1px solid var(--hair)!important;background:var(--ground-2)!important;box-shadow:none!important;scrollbar-width:thin}
html #restDays .kft-rest-grid{background:transparent!important}
html #restDays .kft-rest-row{border-color:var(--hair)!important}
html #restDays .kft-rest-corner,html #restDays .kft-rest-club{background:var(--ground-2)!important;color:var(--ink)!important;border-color:var(--hair)!important}
html #restDays .kft-rest-corner{font:700 11px Manrope!important;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)!important}
html #restDays .kft-rest-club-name{font:700 13px Manrope!important;color:var(--ink)!important}
html #restDays .kft-rest-club.is-mine{box-shadow:inset 3px 0 0 var(--accent)!important}
html #restDays .kft-rest-mine{background:linear-gradient(var(--acc-top),var(--acc-bot))!important;color:var(--accent-ink)!important;font:800 11px Manrope!important;box-shadow:0 1px 0 var(--acc-skirt)}

/* gameweek plates and the day strip */
html #restDays .kft-rest-band{margin:4px 2px;border-radius:7px!important;background:linear-gradient(var(--key-top),var(--key-bot))!important;border:1px solid var(--key-edge)!important;border-top-color:var(--key-lip)!important;box-shadow:0 2px 0 var(--key-skirt)!important;color:var(--key-ink)!important;font:800 11px Manrope!important;letter-spacing:.06em}
html #restDays .kft-rest-day{color:var(--muted)!important;background:transparent!important;border-color:var(--hair)!important}
html #restDays .kft-rest-day span{font:700 9.5px Manrope!important;color:var(--faint)!important}
html #restDays .kft-rest-day b{font:700 12.5px Manrope!important;color:var(--ink-2)!important}
html #restDays .kft-rest-day.is-weekend{background:color-mix(in oklab,var(--ink) 4%,transparent)!important}
html #restDays .kft-rest-day.is-today b{display:inline-grid;place-items:center;min-width:24px;height:22px;padding:0 4px;border-radius:6px;background:linear-gradient(var(--acc-top),var(--acc-bot));color:var(--accent-ink)!important}
html #restDays .kft-rest-day.is-today span{color:var(--accent)!important}
html #restDays .kft-rest-todaycol{background:color-mix(in oklab,var(--accent) 10%,transparent)!important;border-left:1px solid color-mix(in oklab,var(--accent) 45%,transparent)!important}

/* rest gaps: lit bars in a recessed lane */
html #restDays .kft-rest-bar{border-radius:6px!important;font:700 11px Manrope!important;color:#fff!important;text-shadow:0 1px 1px #0006;
  box-shadow:inset 0 1px #ffffff2e,inset 0 -2px #0003,0 0 0 1px #0002!important;transition:filter .12s,transform .12s}
html #restDays .kft-rest-bar:hover{filter:brightness(1.12)}
html #restDays .kft-rest-bar:is(.is-r1,.is-r2,.is-r3,.is-r4,.is-r5){background-image:linear-gradient(#ffffff1f,transparent 55%,#0000001a)!important}
html #restDays .kft-rest-bar.is-r1{background-color:var(--rest-r1)!important}html #restDays .kft-rest-bar.is-r2{background-color:var(--rest-r2)!important}
html #restDays .kft-rest-bar.is-r3{background-color:var(--rest-r3)!important}html #restDays .kft-rest-bar.is-r4{background-color:var(--rest-r4)!important}html #restDays .kft-rest-bar.is-r5{background-color:var(--rest-r5)!important}
[data-theme=light] #restDays .kft-rest-bar{color:#10161b!important;text-shadow:none}

/* matches: small keys; cup and European ties carry an info tint */
html #restDays .kft-rest-match{border-radius:6px!important;font:800 11px Manrope!important;letter-spacing:.02em;color:var(--key-ink)!important;
  background:linear-gradient(var(--key-top),var(--key-bot))!important;border:1px solid var(--key-edge)!important;border-top-color:var(--key-lip)!important;box-shadow:0 2px 0 var(--key-skirt)!important}
html #restDays .kft-rest-match.is-cup{color:var(--info)!important;background:linear-gradient(color-mix(in oklab,var(--info) 16%,var(--key-top)),var(--key-bot))!important}
html #restDays .kft-rest-match:hover{filter:brightness(1.08)}

/* legend, detail popover */
html #restDays .kft-rest-legend{color:var(--muted)!important;font:600 12px Manrope!important}
html #restDays .kft-rest-swatch{border-radius:4px;box-shadow:inset 0 1px #ffffff2e}
html #restDays .kft-rest-detail{border-radius:12px!important;background:var(--raised)!important;border:1px solid var(--hair-2)!important;box-shadow:var(--shadow)!important;color:var(--ink)!important}
html #restDays .kft-rest-cupkey{color:var(--info)!important}
/* a cup or European chip: the opponent, with the competition small beneath it */
html #restDays .kft-rest-match.is-cup{display:grid!important;place-content:center;gap:1px;line-height:1!important}
html #restDays .kft-rest-match.is-cup b{font:800 11px/1 Manrope}
html #restDays .kft-rest-match.is-cup small{font:800 8.5px/1 Manrope;letter-spacing:.06em;opacity:.8}
html #restDays .kft-rest-cupkey{display:inline-grid!important;place-content:center;gap:1px;line-height:1;padding:3px 6px}
html #restDays .kft-rest-cupkey b{font:800 11px/1 Manrope}html #restDays .kft-rest-cupkey small{font:800 8.5px/1 Manrope;opacity:.8}
html #restDays .kft-rest-kit .kft-crest{--crest:22px}
