:root {
  --msll-schedule-ink: #121521;
  --msll-schedule-panel: #ffffff;
  --msll-schedule-line: #d7dce8;
  --msll-schedule-accent: #d71920;
  --msll-schedule-steel: #667086;
  --msll-schedule-royal: #4169e1;
}

.msll-schedule-app,
.msll-schedule-app * {
  box-sizing: border-box;
}

.msll-schedule-app {
  color: var(--msll-schedule-ink);
}

.msll-schedule-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 260px));
  gap: 12px;
  margin-bottom: 20px;
}

.msll-schedule-controls label,
.msll-schedule-filter-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #30384a;
  min-width: 0;
}

.msll-schedule-controls select {
  appearance: none;
  border: 1px solid #aeb8cf;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: var(--msll-schedule-ink);
  background: #fff;
}

.msll-schedule-team-filter,
.msll-schedule-division-filter {
  position: relative;
}

.msll-schedule-team-trigger,
.msll-schedule-division-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  border: 1px solid #aeb8cf;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--msll-schedule-ink);
  background: #fff;
  cursor: pointer;
}

.msll-schedule-team-trigger::after,
.msll-schedule-division-trigger::after {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid #5c6a86;
  border-bottom: 2px solid #5c6a86;
  transform: rotate(45deg) translateY(-2px);
}

.msll-schedule-team-filter.is-open .msll-schedule-team-trigger::after,
.msll-schedule-division-filter.is-open .msll-schedule-division-trigger::after {
  transform: rotate(-135deg) translateY(-1px);
}

.msll-schedule-team-value,
.msll-schedule-division-value {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.msll-schedule-team-menu,
.msll-schedule-division-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #aeb8cf;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(13, 23, 41, 0.14);
}

.msll-schedule-filter-option-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #eef2fa;
  color: var(--msll-schedule-ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.msll-schedule-filter-option-button:last-child {
  border-bottom: 0;
}

.msll-schedule-filter-option-button:hover,
.msll-schedule-filter-option-button.is-selected {
  background: #f4f7ff;
}

.msll-schedule-team-option-label {
  color: #30384a;
  font-size: 0.95rem;
  font-weight: 500;
}

.msll-schedule-root {
  margin-top: 6px;
}

.msll-schedule-week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid var(--msll-schedule-line);
  border-radius: 12px;
  background: #f7f9fd;
}

.msll-schedule-week-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #b8c3db;
  border-radius: 999px;
  color: #2a3852;
  background: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.msll-schedule-week-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.msll-schedule-week-label {
  flex: 1 1 auto;
  text-align: center;
  color: #20304b;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.msll-schedule-date-card {
  background: var(--msll-schedule-panel);
  border: 1px solid var(--msll-schedule-line);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(13, 23, 41, 0.08);
}

.msll-schedule-date-header {
  margin: 0;
  padding: 12px 14px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  border-bottom: 2px solid var(--msll-schedule-accent);
  background: #f7f9fd;
}

.msll-schedule-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.msll-schedule-table th:nth-child(1),
.msll-schedule-table td:nth-child(1) {
  width: calc((100% - 44px) * 0.08);
}

.msll-schedule-table th:nth-child(2),
.msll-schedule-table td:nth-child(2) {
  width: calc((100% - 44px) * 0.20);
}

.msll-schedule-table th:nth-child(3),
.msll-schedule-table td:nth-child(3) {
  width: 44px;
}

.msll-schedule-table th:nth-child(4),
.msll-schedule-table td:nth-child(4) {
  width: calc((100% - 44px) * 0.20);
}

.msll-schedule-table th:nth-child(5),
.msll-schedule-table td:nth-child(5) {
  width: calc((100% - 44px) * 0.10);
}

.msll-schedule-table th:nth-child(6),
.msll-schedule-table td:nth-child(6) {
  width: calc((100% - 44px) * 0.42);
}

.msll-schedule-table th,
.msll-schedule-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--msll-schedule-line);
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msll-schedule-table thead th {
  background: #eef2fa;
  color: #2a3852;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.msll-schedule-table thead th:nth-child(3),
.msll-schedule-table tbody td.msll-schedule-at-marker {
  text-align: center;
}

.msll-schedule-table tbody tr:last-child td {
  border-bottom: 0;
}

.msll-schedule-team {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--msll-schedule-steel);
  font-weight: 500;
  min-width: 0;
  max-width: 100%;
}

.msll-schedule-team img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #d9deea;
  flex: 0 0 auto;
}

.msll-schedule-team-name {
  color: var(--msll-schedule-steel);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msll-schedule-at-marker {
  color: var(--msll-schedule-steel);
  font-weight: 500;
}

.msll-schedule-table tbody td.division-col {
  color: var(--msll-schedule-royal);
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.msll-schedule-division-text {
  color: var(--msll-schedule-royal);
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.msll-schedule-empty {
  background: #fff;
  border: 1px dashed #9fb0cf;
  border-radius: 12px;
  padding: 22px;
  color: #374666;
}

@media (max-width: 780px) {
  .msll-schedule-controls {
    grid-template-columns: minmax(112px, 0.78fr) minmax(0, 1.22fr);
    align-items: end;
  }

  .msll-schedule-week-nav {
    gap: 8px;
    padding: 10px;
  }

  .msll-schedule-week-label {
    font-size: 0.95rem;
  }

  .msll-schedule-table thead {
    display: none;
  }

  .msll-schedule-table,
  .msll-schedule-table tbody {
    display: block;
    width: 100%;
  }

  .msll-schedule-table tbody tr {
    display: grid;
    grid-template-columns: 64px minmax(0, 1.15fr) minmax(0, 0.95fr);
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 6px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--msll-schedule-line);
  }

  .msll-schedule-table tbody td {
    display: flex;
    align-items: center;
    width: auto !important;
    min-width: 0;
    padding: 0;
    border-bottom: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .msll-schedule-table tbody td::before {
    display: none;
  }

  .msll-schedule-team-name {
    white-space: normal;
  }

  .msll-schedule-table tbody td:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
    justify-content: center;
    align-self: stretch;
    padding-right: 10px;
    border-right: 1px solid #d9deea;
    text-align: center;
  }

  .msll-schedule-table tbody td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  .msll-schedule-table tbody td:nth-child(2)::after {
    content: "@";
    display: inline-block;
    margin-left: 6px;
    color: var(--msll-schedule-steel);
    font-size: 0.8rem;
    font-weight: 700;
  }

  .msll-schedule-table tbody td:nth-child(3) {
    display: none;
  }

  .msll-schedule-table tbody td:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
  }

  .msll-schedule-table tbody td:nth-child(5) {
    grid-column: 3;
    grid-row: 1;
    font-weight: 700;
    color: #2a3852;
  }

  .msll-schedule-table tbody td:nth-child(6) {
    grid-column: 3;
    grid-row: 2;
    color: #42506a;
  }

  .msll-schedule-team {
    max-width: 100%;
  }

  .msll-schedule-team img {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 520px) {
  .msll-schedule-controls {
    grid-template-columns: minmax(96px, 0.74fr) minmax(0, 1.26fr);
    gap: 8px;
  }

  .msll-schedule-controls label,
  .msll-schedule-filter-group {
    gap: 5px;
    font-size: 0.8rem;
  }

  .msll-schedule-team-trigger,
  .msll-schedule-division-trigger {
    min-height: 42px;
    padding: 8px 10px;
  }

  .msll-schedule-team img {
    width: 18px;
    height: 18px;
  }

  .msll-schedule-team-name,
  .msll-schedule-team-option-label,
  .msll-schedule-division-text {
    font-size: 0.88rem;
  }

  .msll-schedule-week-button {
    width: 36px;
    height: 36px;
  }

  .msll-schedule-week-label {
    font-size: 0.88rem;
  }

  .msll-schedule-table tbody tr {
    grid-template-columns: 56px minmax(0, 1.05fr) minmax(0, 0.95fr);
    column-gap: 10px;
  }

  .msll-schedule-table tbody td:nth-child(1) {
    padding-right: 8px;
  }
}
