/* ==========================================================================
   Training — profile tabs, the Training tab (profile_training.php) and the
   log sheet. Tokens from modern.css.
   ========================================================================== */

/* ---------- Profile tabs (under the hero) ---------- */
.bc-ptabs {
  display: flex;
  gap: 4px;
  margin: -12px 16px 22px;
  padding: 4px;
  width: fit-content;
  max-width: calc(100% - 32px);
  border-radius: 999px;
  background: var(--bc-surface);
  box-shadow: var(--bc-shadow-1), 0 0 0 1px var(--bc-line);
}
.bc-ptabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bc-muted) !important;
  text-decoration: none !important;
  transition: background-color 0.25s var(--bc-ease), color 0.25s var(--bc-ease);
  -webkit-tap-highlight-color: transparent;
}
.bc-ptabs a i { font-size: 13px; }
.bc-ptabs a:hover { color: var(--bc-ink) !important; background: var(--bc-surface-2); }
.bc-ptabs a[aria-selected="true"] { color: var(--bc-on-ink) !important; background: var(--bc-ink); box-shadow: 0 6px 16px -8px rgba(11, 11, 16, 0.6); }
.bc-ptabs a[aria-selected="true"] i { color: #fff; }
.bc-ptabs a:focus-visible { outline: none; box-shadow: var(--bc-ring); }
.bc-ptab-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  color: var(--bc-ink-2);
  background: var(--bc-surface-3);
}
.bc-ptabs a[aria-selected="true"] .bc-ptab-count { color: var(--bc-ink); background: var(--bc-surface); }
[data-panel][hidden] { display: none !important; }
#bc-panel-training:focus { outline: none; }
.bc-hero-log i { color: var(--bc-accent); }

/* ---------- Loading skeleton ---------- */
.bc-tr-skeleton { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0 16px 28px; }
.bc-tr-skeleton > * { height: 104px; border-radius: var(--bc-r); background: linear-gradient(100deg, var(--bc-surface-3) 30%, var(--bc-surface-2) 50%, var(--bc-surface-3) 70%) 0 0 / 300% 100%; animation: bc-tr-shimmer 1.4s linear infinite; }
.bc-tr-skeleton > span { grid-column: 1 / -1; height: 180px; }
@keyframes bc-tr-shimmer { to { background-position: -300% 0; } }

/* ---------- Layout ---------- */
.bc-tr { margin: 0 16px 28px; color: var(--bc-ink-2); line-height: 1.4; animation: bc-rise 0.45s var(--bc-ease) backwards; }
.bc-tr p, .bc-tr small, .bc-tr span { line-height: inherit; }
.bc-tr h2, .bc-tr h3 { color: var(--bc-ink); margin: 0; letter-spacing: -0.02em; }
.bc-tr-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 4px 18px; flex-wrap: wrap; }
.bc-tr-head h2 { font-size: 24px; line-height: 1.2; }
.bc-tr-head p { margin: 4px 0 0; font-size: 13.5px; color: var(--bc-muted); }
.bc-tr-head p b { color: var(--bc-ink); }
.bc-tr-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.bc-tr-card {
  background: var(--bc-surface);
  border-radius: var(--bc-r-lg);
  box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line);
  padding: 20px 22px;
  margin-bottom: 16px;
  min-width: 0;
}
.bc-tr-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 32px; }
.bc-tr-card-head h3 { font-size: 15px; font-weight: 650; }
.bc-tr-link { font-size: 13px; font-weight: 600; color: var(--bc-accent) !important; }
.bc-tr-muted { color: var(--bc-muted); font-size: 13.5px; margin: 0; }
.bc-tr-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.bc-tr-grid > .bc-tr-card { margin-bottom: 16px; }
.bc-tr-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }

/* ---------- Buttons ---------- */
.bc-tr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font: 600 13.5px/1 var(--bc-font);
  color: var(--bc-ink) !important;
  background: var(--bc-surface);
  box-shadow: 0 0 0 1px var(--bc-line-strong), var(--bc-shadow-1);
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.2s var(--bc-ease), box-shadow 0.2s var(--bc-ease), background-color 0.2s var(--bc-ease), opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.bc-tr-btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--bc-line-strong), var(--bc-shadow-2); }
.bc-tr-btn:active { transform: scale(0.97); }
.bc-tr-btn:focus-visible { outline: none; box-shadow: var(--bc-ring); }
.bc-tr-btn.is-primary { color: var(--bc-on-ink) !important; background: var(--bc-ink); box-shadow: 0 8px 20px -10px rgba(11, 11, 16, 0.7); }
.bc-tr-btn.is-primary:hover { box-shadow: 0 12px 24px -10px rgba(11, 11, 16, 0.7); }
.bc-tr-btn.is-lg { min-height: 50px; padding: 0 24px; font-size: 15px; }
.bc-tr-btn.is-ghost { background: var(--bc-surface-2); box-shadow: none; }
.bc-tr-btn.is-danger { color: #fff !important; background: var(--bc-red); box-shadow: none; }
.bc-tr-btn.is-danger-ghost { color: var(--bc-red) !important; background: transparent; box-shadow: none; padding: 0 10px; }
.bc-tr-btn[disabled] { opacity: 0.55; pointer-events: none; }

/* ---------- Tiles ---------- */
.bc-tr-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.bc-tr-tile {
  position: relative;
  padding: 16px 16px 14px;
  border-radius: var(--bc-r);
  background: var(--bc-surface);
  box-shadow: var(--bc-shadow-1), 0 0 0 1px var(--bc-line);
  min-width: 0;
}
.bc-tr-tile-label { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--bc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-tr-tile-label i { font-size: 11px; color: var(--bc-faint); }
.bc-tr-tile-value { margin-top: 8px; font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; color: var(--bc-ink); font-variant-numeric: tabular-nums; }
.bc-tr-tile-value small { font-size: 15px; font-weight: 600; margin-left: 2px; color: var(--bc-muted); letter-spacing: 0; }
.bc-tr-tile-hint { margin-top: 8px; font-size: 12px; color: var(--bc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-tr-tile.is-accent { background: linear-gradient(145deg, #1b1830 0%, #2d2366 100%); box-shadow: 0 10px 28px -14px rgba(45, 35, 102, 0.8); }
.bc-tr-tile.is-accent .bc-tr-tile-label, .bc-tr-tile.is-accent .bc-tr-tile-label i, .bc-tr-tile.is-accent .bc-tr-tile-hint { color: rgba(255, 255, 255, 0.72); }
.bc-tr-tile.is-accent .bc-tr-tile-value { color: #fff; }
.bc-tr-tile.is-streak .bc-tr-tile-label i { color: #eb6834; }
.bc-tr-tile.is-streak::after { content: ""; position: absolute; inset: auto 12px 0; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, #eda100, #eb6834, #e34948); }

/* ---------- Heatmap ---------- */
.bc-heat { --cell: 13px; --gap: 3px; }
.bc-heat-scroll { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.bc-heat-scroll::-webkit-scrollbar { display: none; }
.bc-heat-inner { width: max-content; margin: 0 auto; }
.bc-heat-months { display: grid; grid-template-columns: repeat(53, var(--cell)); gap: var(--gap); margin-left: 30px; height: 16px; font-size: 11px; color: var(--bc-muted); }
.bc-heat-months span { white-space: nowrap; }
.bc-heat-body { display: flex; gap: 6px; }
.bc-heat-days { display: grid; grid-template-rows: repeat(7, var(--cell)); gap: var(--gap); width: 24px; font-size: 10px; line-height: var(--cell); color: var(--bc-faint); }
.bc-heat-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, var(--cell)); grid-auto-columns: var(--cell); gap: var(--gap); }
.bc-heat i { display: block; width: var(--cell); height: var(--cell); border-radius: 3px; background: var(--bc-surface-3); }
.bc-heat i.l1 { background: #d9d4fb; }
.bc-heat i.l2 { background: #a99cf2; }
.bc-heat i.l3 { background: #6f5ce0; }
.bc-heat i.l4 { background: #3b2aa8; }
.bc-heat i.is-future { background: transparent; }
.bc-heat-grid i[data-n] { cursor: pointer; }
.bc-heat-grid i:hover, .bc-heat-grid i.is-hot { outline: 2px solid var(--bc-ink); outline-offset: 1px; }
.bc-heat-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 12.5px; color: var(--bc-muted); flex-wrap: wrap; }
.bc-heat-foot b { color: var(--bc-ink); }
.bc-heat-legend { display: inline-flex; align-items: center; gap: 3px; }
.bc-heat-legend i { width: 11px; height: 11px; }
.bc-heat-tip {
  position: fixed;
  z-index: 1200;
  padding: 7px 10px;
  border-radius: 10px;
  font: 500 12px/1.35 var(--bc-font);
  color: #fff;
  background: rgba(11, 11, 16, 0.92);
  box-shadow: var(--bc-shadow-3);
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px));
}
.bc-heat-tip b { font-weight: 700; }

/* ---------- Segmented control ---------- */
.bc-tr-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bc-surface-2); box-shadow: 0 0 0 1px var(--bc-line) inset; }
.bc-tr-seg button { border: 0; background: transparent; padding: 6px 12px; min-height: 30px; border-radius: 999px; font: 600 12.5px/1 var(--bc-font); color: var(--bc-muted); cursor: pointer; }
.bc-tr-seg button[aria-selected="true"] { color: var(--bc-ink); background: var(--bc-surface); box-shadow: var(--bc-shadow-1), 0 0 0 1px var(--bc-line); }

/* ---------- Session list ---------- */
.bc-tr-list { display: flex; flex-direction: column; }
.bc-tr-month {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 10px 0 4px !important;
  padding: 6px 0;
  font-size: 12px !important;
  font-weight: 700;
  letter-spacing: 0.06em !important;
  text-transform: uppercase;
  color: var(--bc-muted) !important;
  background: var(--bc-surface);
}
.bc-tr-month:first-child { margin-top: 0 !important; }
.bc-tr-row {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 14px;
  padding: 12px 10px;
  margin: 0 -10px;
  border-radius: 14px;
  transition: background-color 0.2s var(--bc-ease), opacity 0.3s, transform 0.3s var(--bc-ease);
}
.bc-tr-row + .bc-tr-row::before { content: ""; position: absolute; top: 0; left: 72px; right: 10px; border-top: 1px solid var(--bc-line); }
.bc-tr-row:hover { background: var(--bc-surface-2); }
.bc-tr-row:hover::before, .bc-tr-row:hover + .bc-tr-row::before { border-color: transparent; }
.bc-tr-row.is-pending { opacity: 0.55; }
.bc-tr-row.is-new { animation: bc-tr-in 0.5s var(--bc-ease-spring); background: color-mix(in srgb, var(--bc-accent) 7%, transparent); }
.bc-tr-row.is-leaving { opacity: 0; transform: translateX(16px); }
@keyframes bc-tr-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
.bc-tr-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 52px;
  border-radius: 12px;
  background: var(--bc-surface-2);
  box-shadow: 0 0 0 1px var(--bc-line) inset;
  line-height: 1;
}
.bc-tr-date b { font-size: 19px; font-weight: 700; color: var(--bc-ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bc-tr-date span { margin-top: 4px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bc-muted); }
.bc-tr-main { min-width: 0; padding-top: 2px; }
.bc-tr-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.bc-tr-ico { flex: 0 0 auto; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; font-size: 11px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.bc-tr-name { font-size: 14.5px; font-weight: 650; color: var(--bc-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-tr-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12.5px; color: var(--bc-muted); }
.bc-tr-meta span { display: inline-flex; align-items: center; gap: 6px; }
.bc-tr-meta i { font-size: 11px; color: var(--bc-faint); }
.bc-tr-note {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--bc-ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.bc-tr-note.is-open { -webkit-line-clamp: unset; display: block; }
.bc-tr-photo { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; cursor: zoom-in; box-shadow: 0 0 0 1px var(--bc-line); }
.bc-tr-edit {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--bc-faint);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.bc-tr-row:hover .bc-tr-edit, .bc-tr-edit:focus-visible { color: var(--bc-ink); background: var(--bc-surface); box-shadow: 0 0 0 1px var(--bc-line); }
.bc-tr-more { display: block; width: 100%; margin-top: 12px; min-height: 44px; border: 0; border-radius: 12px; font: 600 13.5px/1 var(--bc-font); color: var(--bc-ink-2); background: var(--bc-surface-2); cursor: pointer; }
.bc-tr-more:hover { background: var(--bc-surface-3); }
.bc-tr-more[aria-busy="true"] { opacity: 0.6; }

/* ---------- Records, milestones, side lists ---------- */
.bc-tr-records { list-style: none; margin: 0; padding: 0; }
.bc-tr-records li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--bc-line); }
.bc-tr-records li:first-child { border-top: 0; padding-top: 0; }
.bc-tr-records li:last-child { padding-bottom: 0; }
.bc-tr-rec-ico { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; font-size: 13px; color: var(--bc-accent); background: color-mix(in srgb, var(--bc-accent) 10%, transparent); }
.bc-tr-rec-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bc-tr-rec-txt > span { font-size: 13.5px; font-weight: 600; color: var(--bc-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-tr-rec-txt small { font-size: 12px; color: var(--bc-muted); }
.bc-tr-records b { flex: 0 0 auto; font-size: 14px; font-weight: 700; color: var(--bc-ink); text-align: right; }
.bc-tr-rec-ico.is-inj { color: #d97706; background: rgba(245, 158, 11, 0.12); }
.bc-tr-rec-ico.is-inj.is-r0, .bc-tr-rec-ico.is-inj.is-r1 { color: var(--bc-green); background: rgba(22, 163, 74, 0.1); }
.bc-tr-rec-ico.is-inj.is-r4, .bc-tr-rec-ico.is-inj.is-r5 { color: var(--bc-red); background: rgba(225, 29, 72, 0.1); }
.bc-tr-inj { font-size: 12px !important; padding: 3px 9px; border-radius: 999px; background: var(--bc-surface-2); }
.bc-tr-next { display: flex; align-items: center; gap: 16px; }
.bc-tr-next .bc-ring svg { width: 76px; height: 76px; }
.bc-tr-next .bc-ring-big { font-size: 15px; }
.bc-tr-next .bc-ring-fill { stroke: #5b4bd1 !important; }
.bc-tr-next > div:last-child { display: flex; flex-direction: column; gap: 3px; }
.bc-tr-next b { font-size: 15px; color: var(--bc-ink); }
.bc-tr-next span { font-size: 12.5px; color: var(--bc-muted); }
.bc-tr-badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.bc-tr-badge { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; border-radius: 12px; background: var(--bc-surface-2); box-shadow: 0 0 0 1px var(--bc-line) inset; }
.bc-tr-badge b { font-size: 16px; font-weight: 750; color: var(--bc-ink); letter-spacing: -0.02em; }
.bc-tr-badge small { font-size: 10.5px; color: var(--bc-muted); white-space: nowrap; }
.bc-tr-badge:first-child { background: linear-gradient(145deg, #fff7e6, #ffe9c7); box-shadow: 0 0 0 1px rgba(237, 161, 0, 0.3) inset; }

/* ---------- Empty / notice ---------- */
.bc-tr-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 20px; margin: 0 0 16px; border-radius: var(--bc-r-lg); background: var(--bc-surface); box-shadow: var(--bc-shadow-2), 0 0 0 1px var(--bc-line); }
.bc-tr > .bc-tr-empty, #bc-panel-training > .bc-tr-empty { margin-left: 0; margin-right: 0; }
#bc-panel-training > .bc-tr-empty { margin: 0 16px 28px; }
.bc-tr-empty-ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; font-size: 26px; color: #fff; background: var(--bc-brand-grad); box-shadow: 0 14px 30px -14px rgba(91, 75, 209, 0.8); }
.bc-tr-empty h3 { font-size: 20px; margin: 6px 0 0; color: var(--bc-ink); }
.bc-tr-empty p { max-width: 420px; margin: 0 0 8px; font-size: 14px; color: var(--bc-muted); }
/* ---------- Sharing panel (owner) + visitor preview bar ---------- */
.bc-tr-priv { padding: 16px 20px; }
.bc-tr-priv-head { display: flex; align-items: flex-start; gap: 12px; }
.bc-tr-priv-ico { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; font-size: 14px; color: var(--bc-green); background: color-mix(in srgb, var(--bc-green) 12%, transparent); transition: color 0.2s, background-color 0.2s; }
.bc-tr-priv[data-state="private"] .bc-tr-priv-ico { color: var(--bc-muted); background: var(--bc-surface-3); }
.bc-tr-priv[data-state="nonotes"] .bc-tr-priv-ico { color: var(--bc-accent); background: color-mix(in srgb, var(--bc-accent) 12%, transparent); }
.bc-tr-priv-title { flex: 1 1 auto; min-width: 0; }
.bc-tr-priv-title h3 { font-size: 15px; font-weight: 650; }
.bc-tr-priv-title p { margin: 3px 0 0; font-size: 13px; color: var(--bc-muted); }
.bc-tr-priv-preview { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--bc-surface-2); cursor: pointer; white-space: nowrap; }
.bc-tr-priv-preview[hidden] { display: none; }
.bc-tr-priv-preview:focus-visible { outline: none; box-shadow: var(--bc-ring); }
.bc-tr-priv-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin-top: 12px; border-top: 1px solid var(--bc-line); }
.bc-tr-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0; padding: 12px 0 2px; cursor: pointer; }
.bc-tr-switch-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bc-tr-switch-text strong { font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--bc-ink); }
.bc-tr-switch-text small { font-size: 12.5px; line-height: 1.4; color: var(--bc-muted); }
.bc-tr-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bc-tr-switch-ui { position: relative; flex: 0 0 auto; width: 48px; height: 28px; border-radius: 999px; background: var(--bc-surface-3); box-shadow: inset 0 0 0 1px var(--bc-line-strong); transition: background-color 0.2s var(--bc-ease); }
.bc-tr-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--bc-surface); box-shadow: 0 1px 3px rgba(16, 16, 30, 0.25); transition: transform 0.22s var(--bc-ease-spring, var(--bc-ease)); }
.bc-tr-switch input:checked + .bc-tr-switch-ui { background: var(--bc-green); box-shadow: none; }
.bc-tr-switch input:checked + .bc-tr-switch-ui::after { transform: translateX(20px); }
.bc-tr-switch input:focus-visible + .bc-tr-switch-ui { box-shadow: var(--bc-ring); }
.bc-tr-switch.is-disabled { cursor: default; opacity: 0.5; }
.bc-tr-previewbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; padding: 10px 12px 10px 16px; border-radius: var(--bc-r); font-size: 13.5px; font-weight: 600; color: var(--bc-ink); background: color-mix(in srgb, var(--bc-accent) 10%, var(--bc-surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--bc-accent) 30%, transparent); }
.bc-tr-previewbar > i { color: var(--bc-accent); }
.bc-tr-previewbar > span { flex: 1 1 auto; min-width: 0; }
.bc-tr-previewbar .bc-tr-btn { min-height: 34px; }
@media (max-width: 767px) {
  .bc-tr-priv { padding: 14px 16px; }
  .bc-tr-priv-head { flex-wrap: wrap; }
  .bc-tr-priv-title { flex-basis: calc(100% - 48px); }
  .bc-tr-priv-preview { margin-left: 48px; }
  .bc-tr-priv-switches { grid-template-columns: minmax(0, 1fr); }
  .bc-tr-switch + .bc-tr-switch { border-top: 1px solid var(--bc-line); padding-top: 12px; }
  .bc-tr-switch { padding-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .bc-tr-switch-ui::after { transition: none; }
}

.bc-tr-notice { display: flex; gap: 14px; align-items: flex-start; font-size: 13.5px; }
.bc-tr-notice > i { font-size: 20px; color: var(--bc-amber); margin-top: 2px; }

/* ---------- Floating log button (mobile) ---------- */
.bc-tr-fab {
  position: fixed;
  right: 16px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 1030;
  display: none;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 22px 0 20px;
  border: 0;
  border-radius: 999px;
  font: 700 15px/1 var(--bc-font);
  color: var(--bc-on-ink);
  background: var(--bc-ink);
  box-shadow: 0 16px 32px -12px rgba(11, 11, 16, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  cursor: pointer;
  animation: bc-tr-in 0.45s var(--bc-ease-spring) 0.2s backwards;
}
.bc-tr-fab i { font-size: 16px; }
.bc-tr-fab:active { transform: scale(0.96); }

/* ---------- Log sheet: the generic .bc-sheet family lives in styles/sheet.css ---------- */
.bc-sheet-foot .bc-tr-save { margin-left: auto; min-width: 140px; }

.bc-tr-field { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.bc-tr-field legend, .bc-tr-label { display: block; margin: 0 0 8px; padding: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--bc-muted); float: none; width: auto; }
.bc-tr-label span { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--bc-faint); }
.bc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bc-chip { position: relative; display: inline-flex; margin: 0; cursor: pointer; border: 0; padding: 0; background: none; font: inherit; }
.bc-chip input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bc-chip > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bc-ink-2);
  background: var(--bc-surface-2);
  box-shadow: 0 0 0 1px var(--bc-line) inset;
  transition: background-color 0.18s var(--bc-ease), box-shadow 0.18s var(--bc-ease), color 0.18s, transform 0.18s var(--bc-ease);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.bc-chip > span i { font-size: 13px; color: var(--c, var(--bc-muted)); }
.bc-chip:hover > span { background: var(--bc-surface-3); }
.bc-chip:active > span { transform: scale(0.96); }
.bc-chip input:checked + span { color: #fff; background: var(--c, var(--bc-ink)); box-shadow: 0 6px 14px -8px var(--c, rgba(11, 11, 16, 0.7)); }
.bc-chip input:checked + span i { color: #fff; }
.bc-chip input:focus-visible + span, .bc-chip:focus-visible > span { box-shadow: var(--bc-ring); }
.bc-chip-same > span { color: var(--bc-accent); background: color-mix(in srgb, var(--bc-accent) 9%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--bc-accent) 30%, transparent) inset; }
.bc-chip-same > span i { color: var(--bc-accent); }
.bc-chip-date > span { padding: 0 6px 0 14px; }
.bc-chip-date input[type="date"] { border: 0; background: transparent; font: 600 14px var(--bc-font); color: inherit; min-height: 40px; padding: 0 6px; max-width: 150px; }
.bc-chip-date input:checked + span input[type="date"] { color-scheme: dark; }
.bc-chip-num > span { padding: 0 12px 0 6px; cursor: text; }
.bc-chip-num input { width: 64px; border: 0; background: transparent; font: 600 14px var(--bc-font); color: var(--bc-ink); text-align: right; padding: 0 4px; min-height: 40px; -moz-appearance: textfield; }
.bc-chip-num input::-webkit-outer-spin-button, .bc-chip-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bc-chip-num em { font-style: normal; color: var(--bc-muted); font-weight: 500; }
.bc-chip-num.is-on > span { box-shadow: 0 0 0 2px var(--bc-ink) inset; }
.bc-stepper { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border-radius: 16px; background: var(--bc-surface-2); box-shadow: 0 0 0 1px var(--bc-line) inset; }
.bc-stepper button { display: grid; place-items: center; width: 48px; height: 44px; border: 0; border-radius: 12px; color: var(--bc-ink); background: var(--bc-surface); box-shadow: var(--bc-shadow-1), 0 0 0 1px var(--bc-line); cursor: pointer; font-size: 14px; }
.bc-stepper button:active { transform: scale(0.94); }
.bc-stepper input { width: 64px; border: 0; background: transparent; text-align: center; font: 700 20px var(--bc-font); color: var(--bc-ink); -moz-appearance: textfield; }
.bc-stepper input::-webkit-outer-spin-button, .bc-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bc-tr-field textarea {
  display: block;
  width: 100%;
  min-height: 88px;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  font: 400 15px/1.45 var(--bc-font);
  color: var(--bc-ink);
  background: var(--bc-surface-2);
  box-shadow: 0 0 0 1px var(--bc-line) inset;
  resize: vertical;
}
.bc-tr-field textarea:focus { outline: none; box-shadow: 0 0 0 1px var(--bc-accent) inset, var(--bc-ring); background: var(--bc-surface); }
.bc-tr-photo-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bc-tr-photo-field img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; box-shadow: 0 0 0 1px var(--bc-line); transition: opacity 0.2s, transform 0.3s var(--bc-ease); }
.bc-tr-photo-field img.is-removed { opacity: 0.25; }
.bc-tr-photo-field.bc-rot-busy { overflow: hidden; }
.bc-tr-photo-field.bc-rot-busy::after { top: 110px; }
.bc-tr-rot { display: inline-flex; gap: 8px; }
.bc-tr-rot[hidden] { display: none; }
.bc-tr-rot.is-busy .bc-tr-btn { opacity: 0.5; pointer-events: none; }
.bc-tr-locked { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; padding: 12px 14px; border-radius: 14px; background: rgba(3, 160, 191, 0.08); color: var(--bc-ink-2); font-size: 13px; }
.bc-tr-locked i { color: #03a0bf; font-size: 16px; }
.bc-tr-locked b { display: block; color: var(--bc-ink); font-size: 14px; }
.bc-tr-del { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bc-tr-del-confirm { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--bc-ink); }
.bc-tr-del-confirm[hidden] { display: none; }
.bc-tr-del-confirm .bc-tr-btn { min-height: 38px; padding: 0 14px; }
.bc-sheet.is-editing-locked [data-tr-when], .bc-sheet.is-editing-locked [data-tr-types] { display: none; }

/* ---------- Toast ---------- */
.bc-tr-toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 32px);
  padding: 10px 10px 10px 18px;
  border-radius: 16px;
  font: 600 14px/1.3 var(--bc-font);
  color: #fff;
  background: rgba(11, 11, 16, 0.94);
  box-shadow: var(--bc-shadow-3);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--bc-ease), transform 0.35s var(--bc-ease-spring);
}
.bc-tr-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.bc-tr-toast i { color: #4ade80; }
.bc-tr-toast.is-error i { color: #fb7185; }
.bc-tr-toast button { border: 0; border-radius: 10px; min-height: 36px; padding: 0 14px; font: 700 13.5px/1 var(--bc-font); color: #c4b5fd; background: rgba(255, 255, 255, 0.08); cursor: pointer; }
.bc-tr-toast button[hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (min-width: 1200px) {
  .bc-heat { --cell: 16px; --gap: 4px; }
  .bc-heat-months { margin-left: 34px; }
  .bc-heat-days { width: 28px; }
}
@media (max-width: 1199px) {
  .bc-tr-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bc-tr-skeleton { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .bc-tr-grid, .bc-tr-cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .bc-tr-cols .bc-tr-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 16px; }
}
@media (max-width: 767px) {
  .bc-ptabs { margin: -14px 16px 18px; width: auto; max-width: none; }
  .bc-ptabs a { flex: 1 1 0; justify-content: center; }
  .bc-tr { margin: 0 12px 24px; }
  .bc-tr-head { margin: 0 4px 14px; }
  .bc-tr-head h2 { font-size: 21px; }
  .bc-tr-head-actions .bc-tr-btn.is-primary { display: none; }
  .bc-tr-head-actions .bc-tr-btn span { display: none; }
  .bc-tr-head-actions .bc-tr-btn { width: 40px; padding: 0; }
  .bc-tr-fab { display: inline-flex; }
  .bc-tr-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bc-tr-tile { padding: 14px 14px 12px; }
  .bc-tr-tile-value { font-size: 26px; }
  .bc-tr-card { padding: 16px; border-radius: 20px; }
  .bc-tr-card-head { flex-wrap: wrap; }
  .bc-heat { --cell: 12px; --gap: 3px; }
  .bc-tr-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; padding: 12px 6px; margin: 0 -6px; }
  .bc-tr-row + .bc-tr-row::before { left: 62px; right: 6px; }
  .bc-tr-date { width: 44px; height: 48px; }
  .bc-tr-photo { grid-column: 2; grid-row: 2; width: 100%; height: 160px; max-width: 320px; }
  .bc-tr-edit { grid-column: 3; grid-row: 1; width: 44px; height: 44px; color: var(--bc-muted); }
  .bc-tr-skeleton { margin: 0 12px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .bc-sheet-foot .bc-tr-save { flex: 1 1 auto; }
  .bc-chip > span { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .bc-tr, .bc-tr-row.is-new, .bc-tr-fab, .bc-tr-toast { animation: none !important; transition: none !important; }
}

@media (min-width: 992px) {
  .bc-tr-side { position: sticky; top: 72px; }
}

/* Confirming a delete takes the whole footer */
.bc-sheet-foot:has(.bc-tr-del-confirm:not([hidden])) .bc-tr-save { display: none; }
@media (max-width: 767px) {
  .bc-tr-toast { bottom: calc(158px + env(safe-area-inset-bottom)); }
  .bc-tr-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .bc-tr-title { align-items: flex-start; }
}

/* Gi or no-gi (functions_training.php bcTrainingStyles, profile_training.php, bc-training.js) */
.bc-tr-field legend span { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--bc-faint); }
.bc-chip-style.is-gi { --c: #1c5db5; }
.bc-chip-style.is-nogi { --c: #d4561f; }
.bc-chip-style span { min-width: 72px; justify-content: center; }
.bc-tr-meta .bc-tr-style { padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; color: #fff; background: #1c5db5; }
.bc-tr-meta .bc-tr-style.is-nogi { background: #d4561f; }
