/* Days and hours: the week map (7 x 24), legend, best days and schedule changes. Flat, hairline borders, one hue. */
.tm { --tm0: #EEF0FB; --tm1: #D6DAF6; --tm2: #ADB4EE; --tm3: #7F89E4; --tm4: #5461DC; --tm5: #2F3BB8; --tm-neg: #FFD9CF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tm, :root:not([data-theme="light"]) .tm-ov { --tm0: #1F2347; --tm1: #283070; --tm2: #36409A; --tm3: #4A57C4; --tm4: #6673E6; --tm5: #8F99FF; --tm-neg: #5A2A22; } }
:root[data-theme="dark"] .tm, :root[data-theme="dark"] .tm-ov { --tm0: #1F2347; --tm1: #283070; --tm2: #36409A; --tm3: #4A57C4; --tm4: #6673E6; --tm5: #8F99FF; --tm-neg: #5A2A22; }
.tm-ov { --tm0: #EEF0FB; --tm1: #D6DAF6; --tm2: #ADB4EE; --tm3: #7F89E4; --tm4: #5461DC; --tm5: #2F3BB8; --tm-neg: #FFD9CF; }
.tm-map { display: grid; gap: 3px; min-width: 0; }
.tm-row { display: grid; grid-template-columns: 38px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.tm-day { font-size: 12px; font-weight: 600; color: var(--muted); }
.tm-c { aspect-ratio: 1 / 1; min-height: 14px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font: 600 10.5px var(--font); font-variant-numeric: tabular-nums; color: var(--fg); background: var(--tm0); outline-offset: 1px; cursor: default; overflow: hidden; }
.tm-c:focus-visible { outline: 2px solid var(--coral); }
.tm-c.s0 { background: var(--tm0); } .tm-c.s1 { background: var(--tm1); } .tm-c.s2 { background: var(--tm2); }
.tm-c.s3 { background: var(--tm3); color: #fff; } .tm-c.s4 { background: var(--tm4); color: #fff; } .tm-c.s5 { background: var(--tm5); color: #fff; }
.tm-c.neg { background: var(--tm-neg); }
.tm-c.none { background: transparent; border: 1px dashed var(--line-2); }
.tm-c.off { background-image: repeating-linear-gradient(135deg, transparent 0 3px, var(--line-2) 3px 4px); }
.tm-axis span:not(.tm-day) { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: visible; }
.tm-map.compact .tm-row { grid-template-columns: 18px repeat(24, minmax(0, 1fr)); gap: 2px; }
.tm-map.compact { gap: 2px; }
.tm-map.compact .tm-c { min-height: 8px; border-radius: 2px; aspect-ratio: 1.6 / 1; }
.tm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.tm-legend span { display: inline-flex; align-items: center; gap: 4px; }
.tm-legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; background: var(--tm0); }
.tm-legend i.s0 { background: var(--tm0); } .tm-legend i.s1 { background: var(--tm1); } .tm-legend i.s2 { background: var(--tm2); } .tm-legend i.s3 { background: var(--tm3); } .tm-legend i.s4 { background: var(--tm4); } .tm-legend i.s5 { background: var(--tm5); }
.tm-legend i.neg { background: var(--tm-neg); } .tm-legend i.none { background: transparent; border: 1px dashed var(--line-2); }
.tm-legend i.off { background: var(--surface) repeating-linear-gradient(135deg, transparent 0 3px, var(--line-2) 3px 4px); border: 1px solid var(--line); }
.tm-bar { margin: 0 0 12px; gap: 10px; align-items: flex-start; }
.tm-camps { max-width: 100%; }
.tm-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tm-days li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 14px; }
.tm-bar-t { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.tm-bar-t i { display: block; height: 100%; background: var(--tm3, #7F89E4); border-radius: 999px; }
.tm-bar-t i.good { background: var(--tm5, #2F3BB8); } .tm-bar-t i.weak { background: var(--coral); }
.tm-acts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tm-act { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.tm-act p { margin: 4px 0 0; }
.tm-act.note-only { background: var(--surface-2); border-color: transparent; }
.tm-act .btn { flex-shrink: 0; }
.strip .cell b.tm-w { font: 650 14px/1.3 var(--font); white-space: normal; }
td.tm-wc { white-space: normal !important; min-width: 150px; text-align: left !important; }
@media (max-width: 700px) {
  .tm-row { grid-template-columns: 26px repeat(24, minmax(0, 1fr)); gap: 1.5px; }
  .tm-map { gap: 1.5px; }
  .tm-c { min-height: 9px; border-radius: 2px; font-size: 0; }
  .tm-axis span:not(.tm-day) { font-size: 9px; }
  .tm-days li { grid-template-columns: 78px minmax(0, 1fr); }
  .tm-days li > :last-child { grid-column: 2; }
  .tm-act { flex-direction: column; align-items: stretch; }
  .xgrid.even { grid-template-columns: 1fr; }
}
