.roster-page {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding-top: 8px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 0 0 8px 18px;
}

.page-header > div {
  min-width: 0;
}

.page-header h1 {
  margin: 0;
  color: #07132c;
  font-size: clamp(25px, 2.1vw, 34px);
  line-height: 1.08;
}

.page-header p {
  max-width: 100%;
  margin: 8px 0 0;
  color: #344054;
  font-size: 15px;
  font-weight: 560;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-width: 244px;
  margin-right: 18px;
  color: #111827;
}

.profile-button {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(16, 24, 40, 0.09);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.56);
  font-size: 17px;
  font-weight: 950;
}

.profile-details,
.profile-details strong,
.profile-details span {
  display: block;
  min-width: 0;
}

.profile-details strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.profile-details span {
  color: #344054;
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.preview-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(16, 24, 40, 0.09);
}

.preview-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.preview-title > div {
  min-width: 0;
}

.preview-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--dept-it);
  border: 1px solid rgba(240, 136, 63, 0.22);
  border-radius: 7px;
  background: rgba(240, 136, 63, 0.1);
}

.preview-icon .icon {
  width: 22px;
  height: 22px;
}

.preview-title h2 {
  margin: 0;
  color: #101828;
  font-size: 18px;
  line-height: 1.1;
}

.preview-title p {
  margin: 5px 0 0;
  color: #536071;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.preview-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.status-chip,
.open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-chip {
  gap: 8px;
  color: #0f5132;
  border: 1px solid rgba(0, 110, 67, 0.18);
  background: rgba(0, 110, 67, 0.08);
}

.status-chip span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1fad63;
  box-shadow: 0 0 0 4px rgba(31, 173, 99, 0.12);
}

.open-button {
  gap: 8px;
  color: #fff;
  border: 1px solid rgba(240, 136, 63, 0.34);
  background: linear-gradient(180deg, #f28f45, #e56f22);
  box-shadow: 0 8px 18px rgba(240, 136, 63, 0.2);
}

.open-button:hover {
  background: linear-gradient(180deg, #f49b55, #df6419);
}

.frame-wrap {
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(240, 136, 63, 0.08), rgba(0, 154, 166, 0.07)),
    rgba(10, 24, 39, 0.04);
}

.frame-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  contain: layout paint;
  border-radius: 7px;
  background: #020712;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.roster-frame {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 1920px;
  height: 1080px;
  border: 0;
  background: #020712;
  transform-origin: 0 0;
}

@media (max-width: 1040px) {
  .roster-page {
    width: 100%;
    max-width: calc(100vw - 24px);
    overflow: visible;
    padding-top: 0;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 0 4px 4px;
  }

  .page-header > div {
    width: 100%;
  }

  .profile {
    min-width: 0;
    margin-right: 0;
  }

  .preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 680px) {
  .roster-page {
    max-width: calc(100vw - 24px);
  }

  .page-header p,
  .preview-title p {
    width: 34ch;
    max-width: 100%;
  }

  .page-header h1 {
    font-size: 25px;
  }

  .page-header p {
    font-size: 13px;
  }

  .preview-toolbar {
    padding: 12px;
  }

  .preview-title {
    align-items: flex-start;
  }

  .preview-icon {
    width: 36px;
    height: 36px;
  }

  .preview-title h2 {
    font-size: 16px;
  }

  .preview-title p {
    font-size: 11px;
  }

  .frame-wrap {
    padding: 8px;
  }

  .frame-viewport {
    width: min(100%, calc(100vw - 34px));
  }
}

@media (max-width: 460px) {
  .roster-page {
    max-width: calc(100vw - 16px);
  }

  .preview-actions,
  .status-chip,
  .open-button {
    width: 100%;
  }
}
