.library-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.family-grid {
  display: grid;
  gap: 10px;
}

.family-card {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 82px;
  border: var(--panel-border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: 0 6px 18px rgba(23, 33, 38, 0.035);
  color: var(--ink);
  padding: 13px;
  text-align: left;
}

.family-card.selected,
.family-card:hover {
  border-color: var(--accent);
  background: #f1faf7;
}

.family-card span,
.family-card small {
  color: var(--muted);
}

.modal.compact-modal {
  width: min(720px, calc(100vw - 28px));
}

.promotion-launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.promotion-launcher-card {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.promotion-launcher-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.promotion-launcher-card span {
  color: var(--muted);
  line-height: 1.35;
}

.family-detail {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.family-detail > *,
.product-status-panel {
  min-width: 0;
  max-width: 100%;
}

.availability-toolbar,
.history-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: var(--panel-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 18px rgba(23, 33, 38, 0.035);
}

.availability-toolbar label,
.history-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.availability-table .game-cell {
  min-width: 260px;
}

.status-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.status-pill.active {
  background: #dff5e8;
  color: #145c38;
}

.status-pill.cooldown {
  background: #eceff1;
  color: #4f5b62;
}

.status-pill.available {
  background: #fff1be;
  color: #725000;
}

.status-pill.unavailable {
  border: 1px solid #d7dddf;
  background: #f2f4f5;
  color: #58656b;
}

.tag-pill {
  margin: 2px 4px 2px 0;
  background: #eef3f6;
  color: #425466;
}

.product-status-panel,
.switch-gantt-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: var(--panel-border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.product-status-list {
  display: grid;
  gap: 8px;
}

.product-status-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 150px repeat(3, minmax(90px, 1fr));
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #f8faf9;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
}

.product-status-row small {
  color: var(--muted);
  font-size: 12px;
}

.switch-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.switch-status-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf9;
}

.switch-status-regions {
  display: grid;
  gap: 8px;
}

.switch-status-regions > span {
  display: grid;
  grid-template-columns: 44px minmax(112px, 170px) minmax(110px, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.switch-status-regions .status-pill {
  justify-self: start;
}

.switch-status-regions small {
  line-height: 1.35;
}

.family-workspace-tabs {
  margin-top: 2px;
}

.family-detail,
.xbox-calendar-wrap {
  scroll-margin-top: 12px;
}

.family-workspace-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.family-workspace-panel[hidden] {
  display: none !important;
}

.family-focus-mode > .platform-guide,
.family-focus-mode > .platform-command-grid,
.family-focus-mode > #psDecisionPanel,
.family-focus-mode > #steamDecisionPanel,
.family-focus-mode > #epicDecisionPanel,
.family-focus-mode .xbox-side,
.family-focus-mode .xbox-timeline,
.family-focus-mode .xbox-main > .xbox-family-toolbar,
.family-focus-mode .xbox-main > .section-header.compact-header {
  display: none !important;
}

.family-focus-mode .xbox-layout {
  grid-template-columns: minmax(0, 1fr);
}

.family-focus-mode .xbox-main {
  gap: 12px;
}

.family-focus-mode .xbox-family-grid {
  margin-bottom: 2px;
}

.platform-matrix {
  display: grid;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.platform-matrix-head,
.platform-matrix-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(5, minmax(128px, 1fr));
  gap: 8px;
  min-width: 920px;
  align-items: center;
}

.platform-matrix-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  padding: 0 10px;
}

.platform-matrix-row {
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf9;
}

.platform-matrix-row > span {
  display: grid;
  gap: 5px;
}

.platform-matrix-row small {
  color: var(--muted);
  font-size: 11px;
}

.switch-plan-list {
  display: grid;
  gap: 8px;
}

.switch-plan-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfc;
}

.switch-plan-card div:first-child {
  display: grid;
  gap: 3px;
}

.switch-plan-card span {
  color: var(--muted);
  font-size: 12px;
}

.switch-plan-card.attention {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 196, 172, 0.18);
}

.switch-gantt-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-left: 220px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.switch-gantt-list {
  display: grid;
  gap: 9px;
  overflow-x: auto;
}

.switch-gantt-row {
  display: grid;
  grid-template-columns: 210px minmax(620px, 1fr);
  gap: 10px;
  align-items: stretch;
}

.switch-gantt-name {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf9;
}

.switch-gantt-name span {
  color: var(--muted);
  font-size: 12px;
}

.switch-gantt-track {
  position: relative;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(18, 31, 34, 0.06) 1px, transparent 1px) 0 0 / 25% 100%,
    #ffffff;
  overflow: hidden;
}

.switch-gantt-bar,
.switch-gantt-today {
  position: absolute;
  top: 17px;
  height: 20px;
  border-radius: 4px;
}

.switch-gantt-bar.active {
  background: #47b881;
}

.switch-gantt-bar.cooldown {
  top: 22px;
  height: 10px;
  background: #a9b0b5;
}

.switch-gantt-bar.proposal {
  top: 15px;
  height: 24px;
  border: 2px dashed #1f7a68;
  background: #c9f2d7;
}

.switch-gantt-bar.start {
  top: 12px;
  height: 30px;
  background: #245d83;
}

.switch-gantt-today {
  top: 0;
  width: 3px;
  height: 100%;
  border-radius: 0;
  background: #f5d547;
  z-index: 2;
}

.event-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-event-board {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.event-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.event-chip-wrap {
  display: grid;
  gap: 6px;
  align-content: start;
}

.event-chip {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.event-chip.high {
  border-color: #b6aadf;
  background: #ebe7f8;
}

.event-chip.medium {
  border-color: #f2d9a6;
  background: #fff5dd;
}

.event-chip.low {
  border-color: #c6e4da;
  background: #ebf8f2;
}

.event-chip small {
  color: var(--muted);
}

.event-chip-hint {
  font-weight: 800;
  color: var(--accent) !important;
}

.event-chip-action {
  width: 100%;
}

.primary-mini {
  border-color: transparent;
  background: var(--accent);
  color: #ffffff;
}

.panel-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.xbox-suggestion-panel {
  align-content: start;
}

.xbox-suggestion-list {
  display: grid;
  gap: 10px;
}

.family-suggestion-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.xbox-suggestion-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.xbox-suggestion-card.needs-work {
  border-color: #f2d9a6;
  background: #fffaf0;
}

.xbox-suggestion-card strong,
.xbox-suggestion-card span,
.xbox-suggestion-card p {
  min-width: 0;
}

.xbox-suggestion-card span,
.xbox-suggestion-card p,
.xbox-suggestion-card li,
.xbox-suggestion-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.xbox-suggestion-card p {
  margin: 0;
}

.xbox-suggestion-card ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
}

.suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.generator-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.generator-action-row.inline {
  padding: 0;
  border: 0;
  background: transparent;
}

.generator-action-row span {
  min-width: 0;
}

.generator-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.generator-diagnostics {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7e0e0;
  border-radius: var(--radius);
  background: #f6fbfa;
}

.generator-diagnostics summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-weight: 850;
}

.generator-diagnostics summary::-webkit-details-marker {
  display: none;
}

.generator-diagnostics summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent-strong);
  background: #ffffff;
  flex: 0 0 auto;
}

.generator-diagnostics[open] summary::after {
  content: "-";
}

.generator-diagnostics summary span,
.generator-diagnostics summary small {
  min-width: 0;
}

.generator-diagnostics summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.generator-diagnostic-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.generator-diagnostic-kpis span {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.generator-diagnostic-kpis b {
  font-size: 18px;
}

.generator-diagnostic-kpis small,
.generator-clean,
.generator-more {
  color: var(--muted);
  font-size: 12px;
}

.generator-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.generator-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.generator-filter-chip.active {
  border-color: var(--accent);
  background: #e7f8f5;
  color: var(--accent-strong);
}

.generator-filter-chip span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #eef3f6;
  color: var(--ink);
  font-size: 11px;
}

.generator-rejection-list {
  display: grid;
  gap: 8px;
}

.generator-rejection {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid #eadbb6;
  border-radius: var(--radius);
  background: #fffaf0;
}

.generator-rejection div {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.generator-rejection strong {
  min-width: 0;
  font-size: 13px;
}

.generator-rejection p,
.generator-rejection small,
.generator-clean {
  margin: 0;
  line-height: 1.35;
}

.generator-rejection p {
  color: var(--muted);
  font-size: 12px;
}

.generator-reason {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff1be;
  color: #725000;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.batch-preview-modal .modal-card {
  max-width: 720px;
}

.batch-preview-list {
  display: grid;
  gap: 8px;
  max-height: min(52vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.batch-preview-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf9;
}

.batch-preview-item span,
.batch-preview-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.batch-preview-comparison:empty {
  display: none;
}

.batch-comparison-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.batch-comparison-card {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf9;
}

.batch-comparison-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.batch-comparison-card b {
  color: var(--ink);
  font-size: 14px;
}

.batch-comparison-card em {
  color: var(--accent-strong);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.batch-comparison-card em.negative {
  color: #b42318;
}

.batch-history-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7e0e0;
  border-radius: var(--radius);
  background: #ffffff;
}

.batch-history-heading,
.batch-history-item,
.batch-history-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-history-heading,
.batch-history-item {
  justify-content: space-between;
}

.batch-history-heading div,
.batch-history-item div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.batch-history-heading strong,
.batch-history-item strong {
  color: var(--ink);
  font-size: 13px;
}

.batch-history-heading span,
.batch-history-item span {
  color: var(--muted);
  font-size: 12px;
}

.batch-history-list {
  display: grid;
  gap: 8px;
}

.batch-history-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf9;
}

.batch-history-item.undone {
  opacity: 0.62;
}

.batch-history-impact {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 180px;
}

.batch-history-impact span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef3f6;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.portfolio-scale {
  display: grid;
  grid-template-columns: 220px repeat(4, 1fr);
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.portfolio-scale span:first-child {
  opacity: 0;
}

.portfolio-lanes {
  display: grid;
  gap: 10px;
}

.portfolio-lane {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.portfolio-lane.event-lane {
  grid-template-columns: 208px minmax(0, 1fr);
}

.lane-actions {
  display: grid;
  gap: 6px;
  align-content: center;
}

.portfolio-bar {
  position: absolute;
  display: grid;
  align-content: center;
  gap: 1px;
  height: 28px;
  min-width: 34px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  padding: 0 8px;
  text-align: left;
}

.portfolio-bar span,
.portfolio-bar small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-bar span {
  font-size: 11px;
  font-weight: 800;
}

.portfolio-bar small {
  font-size: 10px;
  opacity: 0.85;
}

.portfolio-bar.family {
  background: var(--accent);
}

.portfolio-bar.family.near-event {
  background: var(--warn);
}

.portfolio-bar.risk-bar {
  background: var(--warn);
}

.portfolio-bar.family.xbox {
  background: var(--blue);
}

.portfolio-bar.family.playstation {
  background: #315aa6;
}

.portfolio-bar.family.steam {
  background: #355e9a;
}

.portfolio-bar.family.epic {
  background: #7a4fbd;
}

.portfolio-bar.event {
  background: #5479b8;
}

.portfolio-bar.event.high {
  background: #5a46a8;
}

.portfolio-bar.event.medium {
  background: #b37a22;
}

.portfolio-bar.event.low {
  background: #2c8a6f;
}

.event-warning {
  display: block;
  color: var(--warn);
  font-size: 12px;
}

.family-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: var(--panel-border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.family-detail-header h2 {
  margin: 0;
}

.family-detail-header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.title-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.title-chip {
  display: grid;
  gap: 4px;
  min-height: 70px;
  border: var(--panel-border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(23, 33, 38, 0.035);
  color: var(--ink);
  padding: 11px;
  text-align: left;
}

.title-chip strong,
.title-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-chip span {
  color: var(--muted);
  font-size: 12px;
}

.title-chip small {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.schedule-cell.promo-cell {
  background: #b9d2f5;
}

.schedule-cell.proposal-cell {
  background: #c9f2d7;
  color: #0c3d25;
  font-weight: 850;
}

.schedule-cell.cooldown-cell {
  background: #b9b9b9;
}

.schedule-cell.start-cell {
  background: #245d83;
  color: #ffffff;
  font-weight: 900;
}

.shared-calendar-shell {
  --calendar-row-height: 26px;
  --calendar-cell-font-size: 11px;
  --calendar-column-width: 62px;
  --calendar-grouped-column-width: 54px;
  --calendar-date-width: 84px;
  --calendar-group-header-height: 40px;
  --calendar-column-header-height: 58px;
  --calendar-single-header-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.shared-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.shared-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shared-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7faf9;
}

.shared-calendar-toolbar > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.shared-calendar-toolbar-actions,
.shared-calendar-view-controls,
.shared-calendar-density-buttons {
  display: flex;
  align-items: center;
}

.shared-calendar-toolbar-actions {
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.shared-calendar-view-controls {
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.shared-calendar-density-label {
  min-width: 72px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.shared-calendar-density-buttons {
  gap: 2px;
}

.shared-calendar-density-buttons .icon-button {
  width: 32px;
  min-width: 32px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.shared-calendar-density-buttons .icon-button:disabled {
  cursor: default;
  opacity: 0.4;
}

.shared-calendar-expand {
  min-width: 96px;
}

.shared-calendar-toolbar strong {
  color: var(--ink);
  font-size: 13px;
}

.shared-calendar-toolbar span {
  color: var(--muted-strong);
  font-size: 11px;
}

.shared-calendar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.shared-calendar-nav .small-button {
  min-height: 32px;
  padding: 0 10px;
}

.shared-calendar-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: min(78vh, 980px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-x pan-y;
}

.shared-calendar-scroll:focus-visible {
  outline: 3px solid rgba(22, 119, 101, 0.2);
  outline-offset: 2px;
}

.shared-promo-calendar {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: var(--surface);
}

.shared-promo-calendar th,
.shared-promo-calendar td {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  height: var(--calendar-row-height);
  padding: 0;
  border-right: 1px solid #dce2df;
  border-bottom: 1px solid #dce2df;
  text-align: center;
  font-size: var(--calendar-cell-font-size);
}

.shared-promo-calendar thead th {
  position: sticky;
  z-index: 5;
  top: 0;
  height: var(--calendar-single-header-height);
  padding: 9px 8px;
  background: #e6eff8;
  color: var(--ink);
  vertical-align: top;
}

.shared-promo-calendar.grouped .shared-calendar-group-row th {
  top: 0;
  height: var(--calendar-group-header-height);
}

.shared-promo-calendar.grouped .shared-calendar-column-row th {
  top: var(--calendar-group-header-height);
  height: var(--calendar-column-header-height);
}

.shared-promo-calendar.grouped .shared-calendar-date-head {
  height: calc(var(--calendar-group-header-height) + var(--calendar-column-header-height));
  vertical-align: middle;
}

.shared-promo-calendar .shared-calendar-product-group {
  padding: 8px 12px;
  border-right: 3px solid #9fb5b0;
  background: #dce9e6;
  vertical-align: middle;
}

.shared-promo-calendar .shared-calendar-product-group > strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-promo-calendar .shared-calendar-product-group > small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-promo-calendar.grouped .shared-calendar-column,
.shared-promo-calendar.grouped td {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
}

.shared-promo-calendar .group-start {
  border-left: 2px solid #9fb5b0;
}

.shared-promo-calendar .group-end {
  border-right: 3px solid #9fb5b0;
}

.shared-promo-calendar thead th > strong,
.shared-promo-calendar thead th > span,
.shared-promo-calendar thead th > small,
.shared-promo-calendar thead th > em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shared-promo-calendar thead th > strong {
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.shared-promo-calendar thead th > span,
.shared-promo-calendar thead th > small {
  margin-top: 4px;
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.shared-promo-calendar thead th > em {
  margin-top: 4px;
  color: var(--accent-strong);
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.shared-promo-calendar .shared-calendar-date-head,
.shared-promo-calendar .shared-calendar-date {
  position: sticky;
  left: 0;
  width: var(--calendar-date-width);
  min-width: var(--calendar-date-width);
  max-width: var(--calendar-date-width);
  background: #f7f9f8;
}

.shared-promo-calendar .shared-calendar-date-head {
  z-index: 8;
}

.shared-promo-calendar .shared-calendar-date {
  z-index: 4;
  padding: 4px 7px;
  color: var(--muted-strong);
  text-align: left;
}

.shared-calendar-date time,
.shared-calendar-date small {
  display: block;
  white-space: nowrap;
}

.shared-calendar-date time {
  font-weight: 800;
}

.shared-calendar-date small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.shared-promo-calendar.fit-wide {
  width: 100%;
}

.shared-promo-calendar.fit-wide .shared-calendar-column,
.shared-promo-calendar.fit-wide td {
  width: auto;
  min-width: 72px;
  max-width: none;
}

.shared-promo-calendar.dense th:not(.shared-calendar-date-head):not(.shared-calendar-date),
.shared-promo-calendar.dense td {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
}

.shared-promo-calendar.extra-dense th:not(.shared-calendar-date-head):not(.shared-calendar-date),
.shared-promo-calendar.extra-dense td {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
}

.shared-promo-calendar.grouped.dense th:not(.shared-calendar-date-head):not(.shared-calendar-date),
.shared-promo-calendar.grouped.dense td,
.shared-promo-calendar.grouped.extra-dense th:not(.shared-calendar-date-head):not(.shared-calendar-date),
.shared-promo-calendar.grouped.extra-dense td {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
}

.shared-calendar-shell[data-calendar-density="overview"] {
  --calendar-row-height: 18px;
  --calendar-cell-font-size: 10px;
  --calendar-column-width: 50px;
  --calendar-grouped-column-width: 44px;
  --calendar-date-width: 68px;
  --calendar-group-header-height: 30px;
  --calendar-column-header-height: 42px;
  --calendar-single-header-height: 66px;
}

.shared-calendar-shell[data-calendar-density="comfortable"] {
  --calendar-row-height: 34px;
  --calendar-cell-font-size: 12px;
  --calendar-column-width: 82px;
  --calendar-grouped-column-width: 76px;
  --calendar-date-width: 100px;
  --calendar-group-header-height: 46px;
  --calendar-column-header-height: 68px;
  --calendar-single-header-height: 88px;
}

.shared-calendar-shell .shared-promo-calendar th:not(.shared-calendar-date-head):not(.shared-calendar-date),
.shared-calendar-shell .shared-promo-calendar td {
  width: var(--calendar-column-width);
  min-width: var(--calendar-column-width);
  max-width: var(--calendar-column-width);
}

.shared-calendar-shell .shared-promo-calendar.grouped th:not(.shared-calendar-date-head):not(.shared-calendar-date),
.shared-calendar-shell .shared-promo-calendar.grouped td {
  width: var(--calendar-grouped-column-width);
  min-width: var(--calendar-grouped-column-width);
  max-width: var(--calendar-grouped-column-width);
}

.shared-calendar-shell .shared-promo-calendar.fit-wide th:not(.shared-calendar-date-head):not(.shared-calendar-date),
.shared-calendar-shell .shared-promo-calendar.fit-wide td {
  width: auto;
  min-width: var(--calendar-column-width);
  max-width: none;
}

.shared-calendar-shell .shared-promo-calendar.grouped.fit-wide th:not(.shared-calendar-date-head):not(.shared-calendar-date),
.shared-calendar-shell .shared-promo-calendar.grouped.fit-wide td {
  min-width: var(--calendar-grouped-column-width);
}

.shared-calendar-shell .shared-promo-calendar tbody th,
.shared-calendar-shell .shared-promo-calendar tbody td,
.shared-calendar-shell .shared-promo-calendar .schedule-cell button {
  height: var(--calendar-row-height);
  min-height: var(--calendar-row-height);
}

.shared-calendar-shell[data-calendar-density="overview"] .shared-calendar-date {
  padding: 0 5px;
}

.shared-calendar-shell[data-calendar-density="overview"] .shared-calendar-date small {
  display: none;
}

.shared-calendar-shell[data-calendar-density="overview"] .shared-promo-calendar thead th {
  padding: 5px 4px;
}

.shared-calendar-shell[data-calendar-density="overview"] .shared-promo-calendar thead th > strong {
  font-size: 10px;
  line-height: 1.15;
}

.shared-calendar-shell[data-calendar-density="overview"] .shared-promo-calendar thead th > span,
.shared-calendar-shell[data-calendar-density="overview"] .shared-promo-calendar thead th > small,
.shared-calendar-shell[data-calendar-density="overview"] .shared-promo-calendar thead th > em {
  margin-top: 2px;
  font-size: 8px;
}

.shared-promo-calendar tbody tr:hover td:not(.schedule-cell),
.shared-promo-calendar tbody tr:hover .shared-calendar-date {
  background: #f3f7f5;
}

.shared-promo-calendar .schedule-cell button {
  width: 100%;
  height: 100%;
  min-height: var(--calendar-row-height);
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 780;
}

.shared-promo-calendar .schedule-cell button:not(:disabled):hover,
.shared-promo-calendar .schedule-cell button:not(:disabled):focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
  outline: 0;
}

.shared-promo-calendar .schedule-cell button:disabled {
  cursor: default;
  opacity: 1;
}

.shared-promo-calendar .schedule-cell.deadline-cell {
  background: #ffe69c;
  color: #5f4200;
}

.shared-promo-calendar .schedule-cell.release-cell {
  box-shadow: inset 0 0 0 2px #167765;
}

.shared-promo-calendar .schedule-cell.start-cell {
  background: #245d83;
  color: #ffffff;
  font-weight: 900;
}

body.shared-calendar-expanded {
  overflow: hidden;
}

.shared-calendar-shell.is-expanded {
  position: fixed;
  z-index: 1400;
  inset: 10px;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(13, 31, 28, 0.26);
}

.shared-calendar-shell.has-legend.is-expanded {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.shared-calendar-shell.is-expanded .shared-calendar-scroll {
  height: 100%;
  max-height: none;
}

.shared-promo-calendar .schedule-cell.warning-cell button {
  position: relative;
  padding-right: 16px;
}

.shared-promo-calendar .schedule-cell.warning-cell button::after {
  content: "!";
  position: absolute;
  top: 2px;
  right: 3px;
  display: grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border-radius: 50%;
  background: #9b3d22;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.shared-promo-calendar .schedule-cell.entry-pending-cell {
  background:
    repeating-linear-gradient(
      135deg,
      #fff3cc 0,
      #fff3cc 7px,
      #ffe3a3 7px,
      #ffe3a3 14px
  );
  color: #633b00;
  outline: 2px solid #a85b00;
  outline-offset: -2px;
}

.shared-promo-calendar .schedule-cell.entry-pending-cell button {
  position: relative;
  padding-right: 16px;
}

.shared-promo-calendar .schedule-cell.entry-pending-cell button::after {
  content: "!";
  position: absolute;
  top: 2px;
  right: 3px;
  display: grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border-radius: 50%;
  background: #8a4800;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.shared-promo-calendar .schedule-cell.acknowledged-exception-cell {
  outline: 2px dashed #a85b00;
  outline-offset: -3px;
}

.shared-promo-calendar .schedule-cell.acknowledged-exception-cell button {
  position: relative;
  padding-right: 16px;
}

.shared-promo-calendar .schedule-cell.acknowledged-exception-cell button::after {
  content: "✓";
  position: absolute;
  top: 2px;
  right: 3px;
  display: grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border-radius: 50%;
  background: #8a4800;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.shared-promo-calendar tr.today-row th,
.shared-promo-calendar tr.today-row td {
  box-shadow: inset 0 0 0 999px rgba(255, 232, 71, 0.34);
}

.legend-dot.promotion {
  background: #b9d2f5;
}

.legend-dot.pending-entry {
  border: 2px dashed #a85b00;
  background: #ffe3a3;
}

.legend-dot.acknowledged-exception {
  border: 2px dashed #a85b00;
  background: #ffffff;
}

.legend-dot.warning {
  border: 2px solid #9b3d22;
  background: #fff1ec;
}

.legend-dot.deadline {
  background: #ffe69c;
}

.legend-dot.release {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #167765;
}

.legend-dot.start {
  background: #245d83;
}

@media (max-width: 760px) {
  .shared-calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .shared-calendar-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shared-calendar-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .shared-calendar-view-controls {
    justify-content: flex-end;
    padding-top: 8px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .shared-calendar-density-label {
    margin-right: auto;
    text-align: left;
  }

  .shared-calendar-shell.is-expanded {
    inset: 4px;
    padding: 8px;
  }

  .shared-calendar-nav .small-button {
    min-width: 0;
    padding: 0 6px;
  }
}

.game-cell strong,
.game-cell span {
  display: block;
}

.game-cell span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.small-button {
  min-height: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
  font-weight: 750;
}

.switch-ncms-worklist {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.switch-ncms-worklist-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.switch-ncms-worklist-actions .muted {
  max-width: 430px;
  text-align: right;
}

.switch-ncms-worklist-actions .secondary-button {
  flex: 0 0 auto;
}

.switch-ncms-batch-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr));
  gap: 12px;
  min-width: 0;
}

.switch-ncms-batch-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid #b76a00;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.switch-ncms-batch-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.switch-ncms-batch-card > header > div {
  min-width: 0;
}

.switch-ncms-batch-card h3,
.switch-ncms-batch-card h4,
.switch-ncms-batch-card p {
  margin: 0;
}

.switch-ncms-batch-card h3 {
  margin-top: 7px;
  font-size: 18px;
  line-height: 1.25;
}

.switch-ncms-batch-card header p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.switch-ncms-name-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
  padding-top: 2px;
  border-top: 1px solid var(--line-soft);
}

.switch-ncms-name-groups section {
  min-width: 0;
  padding-top: 12px;
}

.switch-ncms-name-groups h4 {
  color: var(--muted-strong);
  font-size: 12px;
}

.switch-ncms-name-groups ol {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding-left: 22px;
}

.switch-ncms-name-groups li {
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.switch-ncms-batch-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.switch-ncms-batch-meta > div {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 6px;
  background: var(--surface-soft);
}

.switch-ncms-batch-meta dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.switch-ncms-batch-meta dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.switch-ncms-fallback-note {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #e4bd78;
  border-radius: 6px;
  background: #fff7e8;
  color: #684000;
  font-size: 12px;
}

@media (max-width: 620px) {
  .switch-ncms-worklist-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .switch-ncms-worklist-actions .muted {
    max-width: none;
    text-align: left;
  }

  .switch-ncms-worklist-actions .secondary-button {
    width: 100%;
  }

  .switch-ncms-batch-card > header {
    align-items: stretch;
    flex-direction: column;
  }

  .switch-ncms-batch-card > header .secondary-button {
    width: 100%;
  }

  .switch-ncms-batch-meta {
    grid-template-columns: 1fr;
  }

  .switch-ncms-name-groups {
    grid-template-columns: 1fr;
  }
}

